branch: externals/mct commit 90ee22928e79dd446edc8b61c4b9ff17833ba18e Merge: d69b7ffcb4 7059d07480 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Merge branch 'make-keyboard-quit-completion-region' into 'main' Make mct-keyboard-quit-dwim work with mct-region-mode See merge request protesilaos/mct!5 --- mct.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mct.el b/mct.el index 1784504fb3..586cf44f5f 100644 --- a/mct.el +++ b/mct.el @@ -900,9 +900,11 @@ If the region is active, deactivate it. A second invocation of this command is then required to abort the session." (interactive nil mct-minibuffer-mode) (when (derived-mode-p 'completion-list-mode) - (if (use-region-p) - (keyboard-quit) - (abort-recursive-edit)))) + (cond + ((null (active-minibuffer-window)) + (minibuffer-hide-completions)) + ((use-region-p) (keyboard-quit)) + (t (abort-recursive-edit))))) ;;;; Global minor mode setup