Function: minibuffer-choose-completion-or-exit

minibuffer-choose-completion-or-exit is an interactive and byte-compiled function defined in minibuffer.el.gz.

Signature

(minibuffer-choose-completion-or-exit &optional NO-EXIT NO-QUIT)

Documentation

Choose the completion from the minibuffer or exit the minibuffer.

When minibuffer-choose-completion can't find a completion candidate in the completions window, then exit the minibuffer using its present contents.

Probably introduced at or before Emacs version 30.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun minibuffer-choose-completion-or-exit (&optional no-exit no-quit)
  "Choose the completion from the minibuffer or exit the minibuffer.
When `minibuffer-choose-completion' can't find a completion candidate
in the completions window, then exit the minibuffer using its present
contents."
  (interactive "P")
  (condition-case nil
      (let ((choose-completion-deselect-if-after t))
        (minibuffer-choose-completion no-exit no-quit))
    (error (minibuffer-complete-and-exit))))