[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/faces.el,v

From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/faces.el,v
Date: Sat, 13 Oct 2007 19:36:10 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/10/13 19:36:10

Index: faces.el
RCS file: /sources/emacs/emacs/lisp/faces.el,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -b -r1.377 -r1.378
--- faces.el    21 Sep 2007 07:23:03 -0000      1.377
+++ faces.el    13 Oct 2007 19:36:10 -0000      1.378
@@ -1444,12 +1444,11 @@
 (defun face-spec-set (face spec &optional frame)
   "Set FACE's attributes according to the first matching entry in SPEC.
 FRAME is the frame whose frame-local face is set.  FRAME nil means
-do it on all frames.  See `defface' for information about SPEC.
-If SPEC is nil, do nothing."
-  (if frame
+do it on all frames (and change the default for new frames).
+See `defface' for information about SPEC.  If SPEC is nil, do nothing."
       (let ((attrs (face-spec-choose spec frame)))
        (when spec
-         (face-spec-reset-face face frame))
+      (face-spec-reset-face face (or frame t)))
        (while attrs
          (let ((attribute (car attrs))
                (value (car (cdr attrs))))
@@ -1464,8 +1463,11 @@
              (t (unless (assq attribute face-x-resources)
                   (setq attribute nil))))
            (when attribute
-             (set-face-attribute face frame attribute value)))
+         ;; If frame is nil, set the default for new frames.
+         ;; Existing frames are handled below.
+         (set-face-attribute face (or frame t) attribute value)))
          (setq attrs (cdr (cdr attrs)))))
+  (unless frame
     ;; When we reset the face based on its spec, then it is unmodified
     ;; as far as Custom is concerned.
     (put (or (get face 'face-alias) face) 'face-modified nil)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]