changeset 33852:01da583dbe56

(face-set-after-frame-default): Let face attributes specified for new frames override frame parameters.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 24 Nov 2000 13:16:13 +0000
parents ce2b486e1171
children eb4affa4abc6
files lisp/faces.el
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Fri Nov 24 12:29:32 2000 +0000
+++ b/lisp/faces.el	Fri Nov 24 13:16:13 2000 +0000
@@ -1488,14 +1488,16 @@
 		  (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."