Function: orderless-annotation

orderless-annotation is a byte-compiled function defined in orderless.el.

Signature

(orderless-annotation PRED REGEXP)

Documentation

Match candidates where the annotation matches PRED and REGEXP.

Source Code

;; Defined in ~/.emacs.d/elpa/orderless-20260519.1029/orderless.el
(defun orderless-annotation (pred regexp)
  "Match candidates where the annotation matches PRED and REGEXP."
  (let ((md (orderless--metadata)))
    (if-let* ((fun (compat-call completion-metadata-get md 'affixation-function)))
        (lambda (str)
          (cl-loop for s in (cdar (funcall fun (list str)))
                   thereis (orderless--match-p pred regexp s)))
      (when-let* ((fun (compat-call completion-metadata-get md 'annotation-function)))
          (lambda (str) (orderless--match-p pred regexp (funcall fun str)))))))