Function: facemenu-active-faces
facemenu-active-faces is a byte-compiled function defined in
facemenu.el.gz.
Signature
(facemenu-active-faces FACE-LIST &optional FRAME)
Documentation
Return from FACE-LIST those faces that would be used for display.
This means each face attribute is not specified in a face earlier in FACE-LIST and such a face is therefore active when used to display text. If the optional argument FRAME is given, use the faces in that frame; otherwise use the selected frame. If t, then the global, non-frame faces are used.
Source Code
;; Defined in /usr/src/emacs/lisp/facemenu.el.gz
(defun facemenu-active-faces (face-list &optional frame)
"Return from FACE-LIST those faces that would be used for display.
This means each face attribute is not specified in a face earlier in FACE-LIST
and such a face is therefore active when used to display text.
If the optional argument FRAME is given, use the faces in that frame; otherwise
use the selected frame. If t, then the global, non-frame faces are used."
(let* ((mask-atts (copy-sequence
(if (consp (car face-list))
(face-attributes-as-vector (car face-list))
(or (internal-lisp-face-p (car face-list) frame)
(check-face (car face-list))))))
(active-list (list (car face-list)))
(face-list (cdr face-list))
(mask-len (length mask-atts)))
(while face-list
(if (let ((face-atts
(if (consp (car face-list))
(face-attributes-as-vector (car face-list))
(or (internal-lisp-face-p (car face-list) frame)
(check-face (car face-list)))))
(i mask-len)
(useful nil))
(while (>= (setq i (1- i)) 0)
(and (not (memq (aref face-atts i) '(nil unspecified)))
(memq (aref mask-atts i) '(nil unspecified))
(aset mask-atts i (setq useful t))))
useful)
(setq active-list (cons (car face-list) active-list)))
(setq face-list (cdr face-list)))
(nreverse active-list)))