Variable: completion-auto-deselect

completion-auto-deselect is a customizable variable defined in minibuffer.el.gz.

Value

t

Documentation

If non-nil, deselect current completion candidate when you type in minibuffer.

A non-nil value means that after typing at the minibuffer prompt, any completion candidate highlighted in *Completions* window (to indicate that it is the selected candidate) will be un-highlighted, and point in the *Completions* window will be moved off such a candidate. This means that RET (minibuffer-choose-completion-or-exit) will exit the minibuffer with the minibuffer's current contents, instead of the selected completion candidate.

This variable was added, or its default value changed, in Emacs 30.1.

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defcustom completion-auto-deselect t
  "If non-nil, deselect current completion candidate when you type in minibuffer.

A non-nil value means that after typing at the minibuffer prompt,
any completion candidate highlighted in *Completions* window (to
indicate that it is the selected candidate) will be un-highlighted,
and point in the *Completions* window will be moved off such a candidate.
This means that `RET' (`minibuffer-choose-completion-or-exit') will exit
the minibuffer with the minibuffer's current contents, instead of the
selected completion candidate."
  :type '(choice (const :tag "Candidates in *Completions* stay selected as you type" nil)
                 (const :tag "Typing deselects any completion candidate in *Completions*" t))
  :version "30.1")