Function: embark--get-affixator

embark--get-affixator is a natively 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 /nix/store/lls066p88vbzffl5j0d16jbhwpn2zfz2-emacs-packages-deps/share/emacs/site-lisp/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)))))