Function: keyfreq-match-p

keyfreq-match-p is a natively compiled function defined in keyfreq.el.

Signature

(keyfreq-match-p CMD)

Documentation

Return t if CMD in keyfreq-excluded-commands or match keyfreq-excluded-regexp.

Source Code

;; Defined in /nix/store/vs0cnjcny583s3d1i80ya8g63h6xkwrn-emacs-packages-deps/share/emacs/site-lisp/elpa/keyfreq-20231107.106/keyfreq.el
(defun keyfreq-match-p (cmd)
  "Return t if CMD in `keyfreq-excluded-commands' or match `keyfreq-excluded-regexp'."
  ;; HACK Inspire by `consult--regexp-filter'
  (let ((filter (mapconcat (lambda (x) (concat "\\(?:" x "\\)"))
                           keyfreq-excluded-regexp "\\|")))
    (or (memq cmd keyfreq-excluded-commands)
        (when keyfreq-excluded-regexp
          (string-match-p filter (symbol-name cmd))))))