Function: ps-face-attribute-list

ps-face-attribute-list is a byte-compiled function defined in ps-print.el.gz.

Signature

(ps-face-attribute-list FACE-OR-LIST)

Source Code

;; Defined in /usr/src/emacs/lisp/ps-print.el.gz
(defun ps-face-attribute-list (face-or-list)
  (cond
   ;; simple face
   ((not (listp face-or-list))
    (ps-face-attributes face-or-list))
   ;; only foreground color, not a `real' face
   ((ps-face-foreground-color-p (car face-or-list))
    (vector 0 (ps-face-extract-color face-or-list) nil))
   ;; only background color, not a `real' face
   ((ps-face-background-color-p (car face-or-list))
    (vector 0 nil (ps-face-extract-color face-or-list)))
   ;; Anonymous face.
   ((keywordp (car face-or-list))
    (vector 0 (plist-get face-or-list :foreground)
	    (plist-get face-or-list :background)))
   ;; list of faces
   (t
    (let ((effects 0)
	  foreground background face-attr face)
      (while face-or-list
	(setq face         (car face-or-list)
	      face-or-list (cdr face-or-list)
	      face-attr    (ps-face-attributes face)
	      effects      (logior effects (aref face-attr 0)))
	(or foreground (setq foreground (aref face-attr 1)))
	(or background
	    (setq background (ps-face-background face (aref face-attr 2)))))
      (vector effects foreground background)))))