1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-26 07:00:35 -08:00

; 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.
This commit is contained in:
Eli Zaretskii 2026-01-15 08:36:46 +02:00
parent b3870cba77
commit cd9ff47ba8
3 changed files with 27 additions and 8 deletions

View file

@ -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

View file

@ -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 <UP> and <DOWN> arrow
keys move point between candidates shown in the *Completions* buffer
display, while <RIGHT> and <LEFT> arrows move point in the minibuffer
window.
---
*** 'RET' chooses the completion selected with 'M-<up>/M-<down>'.
If a completion candidate is selected with 'M-<up>' or 'M-<down>',

View file

@ -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