diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-05-31 09:30:34 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-05-31 09:30:34 +0100 |
commit | 3d73d14b22808e0b2ebc4322d29de473f7225193 (patch) | |
tree | 01bc3bcbccb7458dad210c0c26a3c8a75a3f82aa | |
parent | 89aa9baf75dfd0e61cdeac7e4c12c30836707671 (diff) | |
download | dotfiles-3d73d14b22808e0b2ebc4322d29de473f7225193.tar.gz |
Add function to quit minibuffer from outside
-rw-r--r-- | .emacs.d/lisp/init-minibuffer.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index abd4006..cd14bfc 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -66,11 +66,17 @@ DEFS is a plist associating completion categories to commands." (select-window (minibuffer-selected-window)) (select-window (active-minibuffer-window)))) + (defun minibuffer-really-quit () + "Quit minibuffer session, even if it is not the selected window." + (interactive) + (with-selected-window (active-minibuffer-window) + (minibuffer-keyboard-quit))) + :bind (("C-M-<" . up-from-outside) ("C-M->" . down-from-outside) ("C-M-+" . preview-from-outside) ("M-X" . to-and-fro-minibuffer) - ("C-M-S-g" . minibuffer-keyboard-quit))) + ("C-M-S-g" . minibuffer-really-quit))) (use-package vertico-directory :ensure nil |