diff --git a/modules/base/emacs/base-init.el b/modules/base/emacs/base-init.el index 398f715a..e34945b3 100644 --- a/modules/base/emacs/base-init.el +++ b/modules/base/emacs/base-init.el @@ -17,6 +17,11 @@ :config (general-evil-setup t) + (defun chvp--kill-current-buffer () + (interactive) + (kill-buffer (current-buffer)) + ) + ;; Create bindings under the leader (general-create-definer lmap :states '(normal visual insert emacs motion) @@ -33,7 +38,7 @@ ":" '(eval-expression :which-key "eval") "b" '(:ignore t :which-key "buffer") - "bd" '(kill-this-buffer :which-key "kill") + "bd" '(chvp--kill-current-buffer :which-key "kill") "br" '(rename-buffer :which-key "rename") "f" '(:ignore t :which-key "file") diff --git a/modules/graphical/mail/default.nix b/modules/graphical/mail/default.nix index 055a587c..8b0326b3 100644 --- a/modules/graphical/mail/default.nix +++ b/modules/graphical/mail/default.nix @@ -171,7 +171,7 @@ in ) ) ;; Never actually quit mu4e, just close the current buffer (making sure the modeline is still visible) - (defalias 'mu4e-quit 'kill-this-buffer) + (defalias 'mu4e-quit 'chvp--kill-current-buffer) (define-advice mu4e--context-ask-user (:around (orig-fun &rest args) mu4e--context-ask-user-completing-read) "Replace `mu4e-read-option` by general-purpose completing-read"