Function: embark--get-affixator

embark--get-affixator is a byte-compiled function defined in embark.el.

Signature

(embark--get-affixator TYPE)

Documentation

Get affixation function for current buffer's candidates.

For non-minibuffers, assume candidates are of given TYPE.

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
(defun embark--get-affixator (type)
  "Get affixation function for current buffer's candidates.
For non-minibuffers, assume candidates are of given TYPE."
  (or (embark-collect--metadatum type 'affixation-function)
      (let ((annotator
             (or (embark-collect--metadatum type 'annotation-function)
                 (lambda (_) ""))))
        (lambda (candidates)
          (mapcar (lambda (c)
                    (if-let* ((a (funcall annotator c))) (list c "" a) c))
                  candidates)))))