Function: minibuffer-force-complete-and-exit

minibuffer-force-complete-and-exit is an interactive and byte-compiled function defined in minibuffer.el.gz.

Signature

(minibuffer-force-complete-and-exit)

Documentation

Complete the minibuffer with first of the matches and exit.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun minibuffer-force-complete-and-exit ()
  "Complete the minibuffer with first of the matches and exit."
  (interactive)
  ;; If `completion-cycling' is t, then surely a
  ;; `minibuffer-force-complete' has already executed.  This is not
  ;; just for speed: the extra rotation caused by the second
  ;; unnecessary call would mess up the final result value
  ;; (bug#34116).
  (unless completion-cycling
    (minibuffer-force-complete nil nil 'dont-cycle))
  (completion--complete-and-exit
   (minibuffer--completion-prompt-end) (point-max) #'exit-minibuffer
   ;; If the previous completion completed to an element which fails
   ;; test-completion, then we shouldn't exit, but that should be rare.
   (lambda ()
     (if minibuffer--require-match
         (completion--message "Incomplete")
       ;; If a match is not required, exit after all.
       (exit-minibuffer)))))