summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--files.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/modules/bd--files.el')
-rw-r--r--.config/emacs/modules/bd--files.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el
index 3d3d7b7..6a44d88 100644
--- a/.config/emacs/modules/bd--files.el
+++ b/.config/emacs/modules/bd--files.el
@@ -32,23 +32,23 @@
(defun bd/external-find-file-wrapper (f &rest args)
"Wrapper around F (find-file), passing ARGS."
- (defun runner (f)
+ (defun bd/open-with-function (f)
(funcall f (car args))
(recentf-add-file (car args)))
(let ((ext (or (file-name-extension (car args)) "")))
(cond
((string-match (regexp-opt '("epub" "pdf")) ext)
- (runner #'bd/zathura))
+ (bd/open-with-function #'bd/zathura))
((string-match (regexp-opt '("mkv" "mov" "mp4" "webm" "m4v"
"wav" "mp3" "opus" "ogv" "flac"
"m4a")) ext)
- (runner #'bd/mpv))
+ (bd/open-with-function #'bd/mpv))
((string-match (regexp-opt '("jpg" "jpeg" "png" "webp"
"ico" "gif" "JPG" "PNG")) ext)
- (runner #'bd/nsxiv))
+ (bd/open-with-function #'bd/nsxiv))
((string-match (regexp-opt '("gba" "z64" "n64" "sfc")) ext)
- (runner #'bd/rom))
+ (bd/open-with-function #'bd/rom))
(t (apply f args)))))
(advice-add #'find-file :around #'bd/external-find-file-wrapper)
@@ -66,6 +66,7 @@
(,(regexp-opt '(".html")) "icecat &"))))
(use-package transmission
+ :defer t
:bind
(:map transmission-mode-map
("R" . #'transmission-move)))