Function: corfu--prepare
corfu--prepare is a byte-compiled function defined in corfu.el.
Signature
(corfu--prepare)
Documentation
Insert selected candidate unless command is marked to continue completion.
Implementations
(corfu--prepare) in `corfu.el'.
Undocumented
Source Code
;; Defined in /nix/store/za087xxa0z5mirfbbagrp0qfaqnfn5wb-emacs-packages-deps/share/emacs/site-lisp/elpa/corfu-20260913.1527/corfu.el
(cl-defgeneric corfu--prepare ()
"Insert selected candidate unless command is marked to continue completion."
(corfu--preview-delete)
;; Ensure that state is initialized before next Corfu command
(when (and (symbolp this-command) (string-prefix-p "corfu-" (symbol-name this-command)))
(corfu--update))
;; If the next command is not listed in `corfu-continue-commands', insert the
;; currently selected candidate and bail out of completion. This way you can
;; continue typing after selecting a candidate. The candidate will be inserted
;; and your new input will be appended.
(and (corfu--preview-current-p) (eq corfu-preview-current 'insert)
;; See the comment about `overriding-local-map' in `corfu--post-command'.
(not (or overriding-terminal-local-map
(corfu--match-symbol-p corfu-continue-commands this-command)))
(corfu--insert 'exact)))