From cd9ff47ba8071e722c28a89350730d5a9b0cc819 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 15 Jan 2026 08:36:46 +0200 Subject: [PATCH] ; Update documentation due to a recent change * etc/NEWS: * doc/emacs/mini.texi (Completion Commands): * lisp/minibuffer.el (minibuffer-visible-completions): Update doc string, user manual, and NEWS to reflect changes for bug#80024. --- doc/emacs/mini.texi | 8 ++++++-- etc/NEWS | 7 +++++++ lisp/minibuffer.el | 20 ++++++++++++++------ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index bd39fe550d8..7936712d31c 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -500,7 +500,7 @@ completion buffer and delete the window showing it @vindex minibuffer-visible-completions If the variable @code{minibuffer-visible-completions} is customized to -a non-@code{nil} value, it changes the commands bound to the arrow keys: +the value @code{t}, it changes the commands bound to the arrow keys: instead of moving in the minibuffer, they move between completion candidates, like meta-arrow keys do by default (but note that, just as when the window showing the completion list is selected, here too, @@ -509,7 +509,11 @@ when the window showing the completion list is selected, here too, regardless of the completion list format). Similarly, @kbd{@key{RET}} selects the current candidate, like @kbd{M-@key{RET}} does normally. @code{C-g} hides the completion window, but leaves the minibuffer -active, so you can continue typing at the prompt. +active, so you can continue typing at the prompt. If the value of this +variable is @code{up-down}, only the @kbd{@key{UP}} and @kbd{@key{DOWN}} +arrow keys move point between completion candidates, while +@kbd{@key{RIGHT}} and @kbd{@key{LEFT}} move point in the minibuffer +window. @node Completion Exit @subsection Completion Exit diff --git a/etc/NEWS b/etc/NEWS index d4c4c5c6174..af8eb6da3fa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -199,6 +199,13 @@ different completion categories by customizing be updated as you type, or nil to suppress this always. Note that for large or inefficient completion tables this can slow down typing. ++++ +*** New optional value of 'minibuffer-visible-completions'. +If the value of this option is 'up-down', only the and arrow +keys move point between candidates shown in the *Completions* buffer +display, while and arrows move point in the minibuffer +window. + --- *** 'RET' chooses the completion selected with 'M-/M-'. If a completion candidate is selected with 'M-' or 'M-', diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 30b1ee781c8..1742421939e 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3446,17 +3446,25 @@ the mode hook of this mode." (setq-local minibuffer-completion-auto-choose nil))) (defcustom minibuffer-visible-completions nil - "Whether candidates shown in *Completions* can be navigated from minibuffer. + "Whether to enable navigation of candidates in *Completions* from minibuffer. When non-nil, if the *Completions* buffer is displayed in a window, -you can use the arrow keys in the minibuffer to move the cursor in +you can use the arrow keys in the minibuffer to move point in the window showing the *Completions* buffer. Typing `RET' selects the highlighted completion candidate. If the *Completions* buffer is not displayed on the screen, or this variable is nil, the arrow keys move point in the minibuffer as usual, -and `RET' accepts the input typed into the minibuffer." - :type '(choice (const :tag "Disable completions navigation" nil) - (const :tag "Enable up/down/left/right" t) - (const :tag "Enable only up/down" up-down)) +and `RET' accepts the input typed into the minibuffer. +If the value is t, both up/down and right/left arrow keys move point +in *Completions*; if the value is \\+`up-down', only up/down arrow +keys move point in *Completions*, while left/right arrows move point +in the minibuffer window." + :type '(choice (const :tag + "Disable completions navigation with arrow keys" nil) + (const :tag + "Enable completions navigation with arrow keys" t) + (const :tag + "Enable completions navigation with up/down arrows" + up-down)) :version "30.1") (defvar minibuffer-visible-completions--always-bind nil