Function: which-key--highlight-face

which-key--highlight-face is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--highlight-face DESCRIPTION)

Documentation

Return the highlight face for DESCRIPTION if it has one.

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
(defun which-key--highlight-face (description)
  "Return the highlight face for DESCRIPTION if it has one."
  (let (face)
    (dolist (el which-key-highlighted-command-list)
      (unless face
        (cond ((consp el)
               (when (string-match-p (car el) description)
                 (setq face (cdr el))))
              ((stringp el)
               (when (string-match-p el description)
                 (setq face 'which-key-highlighted-command-face)))
              (t
               (message "which-key: warning: element %s of \
which-key-highlighted-command-list is not a string or a cons
cell" el)))))
    face))