Function: face-set-after-frame-default
face-set-after-frame-default is a byte-compiled function defined in
faces.el.gz.
Signature
(face-set-after-frame-default FRAME &optional PARAMETERS)
Documentation
Initialize the frame-local faces of FRAME.
Calculate the face definitions using the face specs, custom theme
settings, X resources, and face--new-frame-defaults.
Finally, apply any relevant face attributes found amongst the
frame parameters in PARAMETERS.
Source Code
;; Defined in /usr/src/emacs/lisp/faces.el.gz
(defun face-set-after-frame-default (frame &optional parameters)
"Initialize the frame-local faces of FRAME.
Calculate the face definitions using the face specs, custom theme
settings, X resources, and `face--new-frame-defaults'.
Finally, apply any relevant face attributes found amongst the
frame parameters in PARAMETERS."
;; The `reverse' is so that `default' goes first.
(dolist (face (nreverse (face-list)))
(condition-case ()
(progn
;; Initialize faces from face spec and custom theme.
(face-spec-recalc face frame)
;; Apply attributes specified by face--new-frame-defaults
(internal-merge-in-global-face face frame))
;; Don't let invalid specs prevent frame creation.
(error nil)))
;; Apply attributes specified by frame parameters.
(let ((face-params '((foreground-color default :foreground)
(background-color default :background)
(font default :font)
(border-color border :background)
(cursor-color cursor :background)
(scroll-bar-foreground scroll-bar :foreground)
(scroll-bar-background scroll-bar :background)
(mouse-color mouse :background))))
(dolist (param face-params)
(let* ((param-name (nth 0 param))
(value (cdr (assq param-name parameters))))
(if value
(set-face-attribute (nth 1 param) frame
(nth 2 param) value))))))