Function: orderless-kwd-dispatch

orderless-kwd-dispatch is an autoloaded and byte-compiled function defined in orderless-kwd.el.

Signature

(orderless-kwd-dispatch COMPONENT INDEX TOTAL)

Documentation

Match COMPONENT against the keywords in orderless-kwd-alist.

Source Code

;; Defined in ~/.emacs.d/elpa/orderless-20261013.1927/orderless-kwd.el
;;;###autoload
(defun orderless-kwd-dispatch (component _index _total)
  "Match COMPONENT against the keywords in `orderless-kwd-alist'."
  (when (and (not (equal component ""))
             (= (aref component 0) orderless-kwd-prefix))
    (if-let* ((len (length component))
              (pos (or (string-match-p
                        (rx-to-string `(any ,orderless-kwd-separator))
                        component 1)
                       len))
              (sym (intern-soft (substring component 1 pos)))
              (style (alist-get sym orderless-kwd-alist))
              ((or (< (1+ pos) len) (cadr style))))
        (cons (car style) (substring component (min (1+ pos) len)))
      #'ignore)))