Function: ansi-color--find-face
ansi-color--find-face is a byte-compiled function defined in
ansi-color.el.gz.
Signature
(ansi-color--find-face CODES)
Documentation
Return the face corresponding to CODES.
Source Code
;; Defined in /usr/src/emacs/lisp/ansi-color.el.gz
(defun ansi-color--find-face (codes)
"Return the face corresponding to CODES."
;; Sort the codes in ascending order to guarantee that "bold" comes before
;; any of the colors. This ensures that `ansi-color-bold-is-bright' is
;; applied correctly.
(let (faces bright (codes (sort (copy-sequence codes) #'<)))
(while codes
(when-let ((face (ansi-color-get-face-1 (pop codes) bright)))
(when (and ansi-color-bold-is-bright (eq face 'ansi-color-bold))
(setq bright t))
(push face faces)))
;; Avoid some long-lived conses in the common case.
(if (cdr faces)
(nreverse faces)
(car faces))))