Function: vertico--affixate

vertico--affixate is a byte-compiled function defined in vertico.el.

Signature

(vertico--affixate CANDS)

Documentation

Annotate CANDS with annotation function.

Source Code

;; Defined in ~/.emacs.d/elpa/vertico-20260811.1003/vertico.el
(defun vertico--affixate (cands)
  "Annotate CANDS with annotation function."
  (if-let* ((aff (vertico--metadata-get 'affixation-function)))
      (funcall aff cands)
    (if-let* ((ann (vertico--metadata-get 'annotation-function)))
        (cl-loop for cand in cands collect
                 (let ((suff (or (funcall ann cand) "")))
                   ;; The default completion UI adds the `completions-annotations'
                   ;; face if no other faces are present.
                   (unless (text-property-not-all 0 (length suff) 'face nil suff)
                     (setq suff (propertize suff 'face 'completions-annotations)))
                   (list cand "" suff)))
      (cl-loop for cand in cands collect (list cand "" "")))))