Function: embark-consult--unique-match
embark-consult--unique-match is a natively compiled function defined
in embark-consult.el.
Signature
(embark-consult--unique-match &rest _)
Documentation
If there is a unique matching candidate, accept it.
This is intended to be used in embark-target-injection-hooks.
Source Code
;; Defined in /nix/store/9j1lpwknj0cd46jf87pww3rp6rcmnk70-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-consult-20260503.118/embark-consult.el
(defun embark-consult--unique-match (&rest _)
"If there is a unique matching candidate, accept it.
This is intended to be used in `embark-target-injection-hooks'."
(let ((candidates (cdr (embark-minibuffer-candidates))))
(if (or (null candidates) (cdr candidates))
(embark--allow-edit)
(delete-minibuffer-contents)
(insert (car candidates)))))