summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-06-24 20:16:51 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-06-24 20:18:21 +0200
commitcdbb02a597298b7812b456fca3d61e223dc40b7c (patch)
tree0e68d6c41c0f7f8838b69c2e8de3e26e6ee1bb6e /lisp/minibuffer.el
parent41c09d347feb94b9070a9aa2c78ccf65be7fd268 (diff)
downloademacs-cdbb02a597298b7812b456fca3d61e223dc40b7c.tar.gz
Allow toggling completion modes for `M-x' with `M-X'
* doc/lispref/commands.texi (Interactive Call): Document it. * lisp/minibuffer.el (minibuffer-local-must-match-map): Bind 'M-X'. * lisp/simple.el (execute-extended-command-cycle): New command. (read-extended-command): Use it to allow toggling (bug#47215). (read-extended-command-1): Renamed from `read-extended-command'. (execute-extended-command-for-buffer): Factored out most of the code... (command-completion--command-for-this-buffer-function): ... to here. (extended-command-versions): New variable. This code is based on a patch by Felician Nemeth <felician.nemeth@gmail.com>.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index e42d83af342..9ffaff7c8e2 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2780,6 +2780,7 @@ The completion method is determined by `completion-at-point-functions'."
(defvar-keymap minibuffer-local-must-match-map
:doc "Local keymap for minibuffer input with completion, for exact match."
:parent minibuffer-local-completion-map
+ "M-X" #'execute-extended-command-cycle
"RET" #'minibuffer-complete-and-exit
"C-j" #'minibuffer-complete-and-exit)