branch: externals/mct commit 7059d07480d8f051c8d5ebf03db1587ebfef47f2 Author: James N. V. Cash <james....@gmail.com> Commit: James N. V. Cash <james....@gmail.com>
Make mct-keyboard-quit-dwim work with mct-region-mode Otherwise, if the point is in the completions buffer from completion-at-point, C-g doesn't quit, instead just saying "no recursive edit in progress" --- 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