Function: face-differs-from-default-p
face-differs-from-default-p is a byte-compiled function defined in
faces.el.gz.
Signature
(face-differs-from-default-p FACE &optional FRAME)
Documentation
Return non-nil if FACE displays differently from the default face.
If the optional argument FRAME is given, report on face FACE in that frame. If FRAME is t, report on the defaults for face FACE (for new frames). If FRAME is omitted or nil, use the selected frame.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/faces.el.gz
(defun face-differs-from-default-p (face &optional frame)
"Return non-nil if FACE displays differently from the default face.
If the optional argument FRAME is given, report on face FACE in that frame.
If FRAME is t, report on the defaults for face FACE (for new frames).
If FRAME is omitted or nil, use the selected frame."
(let ((attrs
(delq :inherit (mapcar 'car face-attribute-name-alist)))
(differs nil))
(while (and attrs (not differs))
(let* ((attr (pop attrs))
(attr-val (face-attribute face attr frame t)))
(when (and
(not (eq attr-val 'unspecified))
(display-supports-face-attributes-p (list attr attr-val)
frame))
(setq differs attr))))
differs))