From: Gerd Moellmann Date: Fri, 24 Nov 2000 13:16:13 +0000 (+0000) Subject: (face-set-after-frame-default): Let face attributes X-Git-Tag: emacs-pretest-21.0.92~97 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bdc03dd96f38c4c585319301af690a8a5dc66587;p=emacs.git (face-set-after-frame-default): Let face attributes specified for new frames override frame parameters. --- 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."