Function: marginalia-classify-by-command-name

marginalia-classify-by-command-name is a natively compiled function defined in marginalia.el.

Signature

(marginalia-classify-by-command-name)

Documentation

Lookup category for current command.

Source Code

;; Defined in /nix/store/hym71by08nv7fpgl7asan3dvidx05yya-emacs-packages-deps/share/emacs/site-lisp/elpa/marginalia-20260926.1228/marginalia.el
(defun marginalia-classify-by-command-name ()
  "Lookup category for current command."
  (and marginalia--command
       (or (alist-get marginalia--command marginalia-command-categories)
           ;; The command can be an alias, e.g., `recentf' -> `recentf-open'.
           (when-let* ((chain (function-alias-p marginalia--command)))
             (alist-get (car (last chain)) marginalia-command-categories)))))