diff --git a/mct.el b/mct.el index 1784504fb3f794b3fd09cdf1f1063cd20d056e56..586cf44f5fd6c51fb5a02f75a08dd718a5eac68f 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