Function: help-fns--face-attributes

help-fns--face-attributes is a byte-compiled function defined in help-fns.el.gz.

Signature

(help-fns--face-attributes FACE FRAME)

Source Code

;; Defined in /usr/src/emacs/lisp/help-fns.el.gz
(defun help-fns--face-attributes (face frame)
  (let* ((attrs '((:family . "Family")
		  (:foundry . "Foundry")
		  (:width . "Width")
		  (:height . "Height")
		  (:weight . "Weight")
		  (:slant . "Slant")
		  (:foreground . "Foreground")
		  (:distant-foreground . "DistantForeground")
		  (:background . "Background")
		  (:underline . "Underline")
		  (:overline . "Overline")
		  (:strike-through . "Strike-through")
		  (:box . "Box")
		  (:inverse-video . "Inverse")
		  (:stipple . "Stipple")
		  (:font . "Font")
		  (:fontset . "Fontset")
                  (:extend . "Extend")
		  (:inherit . "Inherit")))
         (max-width (apply #'max (mapcar (lambda (x) (length (cdr x)))
					 attrs))))
    (dolist (a attrs)
      (let ((attr (face-attribute face (car a) frame)))
	(insert (make-string (- max-width (length (cdr a))) ?\s)
		(cdr a) ": " (format "%s" attr))
	(if (and (eq (car a) :inherit)
		 (not (eq attr 'unspecified)))
	    ;; Make a hyperlink to the parent face.
	    (save-excursion
	      (re-search-backward ": \\([^:]+\\)" nil t)
	      (help-xref-button 1 'help-face attr)))
	(insert "\n")))
    (terpri)))