diff options
| author | Spencer Baugh <sbaugh@catern.com> | 2023-11-23 13:37:29 +0000 |
|---|---|---|
| committer | Juri Linkov <juri@linkov.net> | 2023-12-03 19:20:51 +0200 |
| commit | 3c093148958d56e0ed8e12a8e00ced1ef052259a (patch) | |
| tree | 3c7e84ad830af9ad50d581e65491bedb2064cc74 /etc/NEWS | |
| parent | 33b6de7acec0536290939303855947c0c2af57d2 (diff) | |
| download | emacs-3c093148958d56e0ed8e12a8e00ced1ef052259a.tar.gz | |
Deselect the selected completion candidate when typing
minibuffer-choose-completion-or-exit submits the selected completion
candidate, if any, ignoring the contents of the minibuffer. But a
user might select a completion candidate and then want to type
something else in the minibuffer and submit what they typed.
Now typing will automatically deselect the selected completion
candidate so that minibuffer-choose-completion-or-exit will not choose
it.
minibuffer-choose-completion has the same behavior as before, and is
not affected by the deselection.
* lisp/minibuffer.el (completion-auto-deselect, completions--deselect)
(completions--after-change): Add.
(minibuffer-completion-help): Add completions--after-change hook.
(minibuffer-next-completion): Bind completion-auto-deselect to nil to
avoid immediately deselecting the completion.
(minibuffer-choose-completion-or-exit): Bind
choose-completion-deselect-if-after so deselection takes effect.
(display-completion-list): Guarantee a newline at the beginning of
*Completions* to avoid ambiguity about candidate selection.
* lisp/simple.el (choose-completion-deselect-if-after): Add.
(choose-completion): Check choose-completion-deselect-if-after.
* etc/NEWS: Announce.
Diffstat (limited to 'etc/NEWS')
| -rw-r--r-- | etc/NEWS | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -628,6 +628,15 @@ completions window. When the completions window is not visible, then all these keys have their usual meaning in the minibuffer. This option is supported for in-buffer completion as well. +*** Selected completion candidates are deselected on typing. +When a user types, point in the *Completions* window will be moved off +any completion candidates. 'minibuffer-choose-completion' ('M-RET') +will still choose a previously-selected completion candidate, but the +new command 'minibuffer-choose-completion-or-exit' (bound by +'minibuffer-visible-completions') will exit with the minibuffer +contents instead. The deselection behavior can be controlled with the +new user option 'completion-auto-deselect'. + ** Pcomplete --- |
