diff options
author | Gerd Moellmann <gerd@gnu.org> | 2000-11-24 13:16:13 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2000-11-24 13:16:13 +0000 |
commit | 9b9c74614fe731cd42af4f8bd74b1d10261146af (patch) | |
tree | 69098ca76df5d0399d84ea0491f5859bd9ec3d96 /lisp/faces.el | |
parent | c97bb1f4f14893cc44a5fd9125e58a8332ed90a2 (diff) | |
download | emacs-9b9c74614fe731cd42af4f8bd74b1d10261146af.tar.gz |
(face-set-after-frame-default): Let face attributes
specified for new frames override frame parameters.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r-- | lisp/faces.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 1f86b0c0075..bcf2b8ffdaf 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1488,14 +1488,16 @@ Initialize colors of certain faces from frame parameters." (scroll-bar-foreground scroll-bar :foreground) (scroll-bar-background scroll-bar :background) (mouse-color mouse :background)))) - (while params - (let ((param-name (nth 0 (car params))) - (face (nth 1 (car params))) - (attr (nth 2 (car params))) - value) - (when (setq value (frame-parameter frame param-name)) - (set-face-attribute face frame attr value))) - (setq params (cdr params))))) + (dolist (param params) + (let ((frame-param (frame-parameter frame (nth 0 param))) + (face (nth 1 param)) + (attr (nth 2 param))) + (when (and frame-param + ;; Don't override face attributes explicitly + ;; specified for new frames. + (eq (face-attribute face attr t) 'unspecified)) + (set-face-attribute face frame attr frame-param)))))) + (defun tty-handle-reverse-video (frame parameters) "Handle the reverse-video frame parameter for terminal frames." |