diff options
-rw-r--r-- | exwm.org | 2 | ||||
-rw-r--r-- | init.org | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -517,7 +517,7 @@ ("i" "irc" jao-chats-irc)] ["Windows" ("f" "Previous window layout" winner-undo :transient t) - ("F" "Undo window layout restore" winner-redo :transient t) + ("B" "Switch to EXWM buffer" jao-exwm--buffer) ("w" "set wallpaper" jao-set-wallpaper) ("W" "set radom wallpaper" jao-set-random-wallpaper)] ["PDFs" @@ -1034,7 +1034,7 @@ #+end_src *** same mode #+begin_src emacs-lisp - (defun jao-buffer-same-mode (&optional mode pre-fn) + (defun jao-buffer-same-mode (&optional mode pre-fn switch-fn) (interactive) (let* ((mode (or mode major-mode)) (modes (if (symbolp mode) (list mode) mode)) @@ -1044,7 +1044,7 @@ ',modes)))) (buff (read-buffer "Buffer: " nil t pred))) (when pre-fn (funcall pre-fn)) - (pop-to-buffer buff))) + (if switch-fn (funcall switch-fn buff) (pop-to-buffer buff)))) (global-set-key (kbd "C-c C-b") #'jao-buffer-same-mode) #+end_src *** projects |