emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117025: Fix bug 16694 with applying X resources


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 r117025: Fix bug 16694 with applying X resources to faces too early.
Date: Mon, 28 Apr 2014 19:15:13 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117025
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16694
author: Matthias Dahl <address@hidden>
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-04-28 22:14:17 +0300
message:
  Fix bug 16694 with applying X resources to faces too early.
  
   lisp/faces.el (face-spec-recalc): Apply X resources only after the
   defface spec has been applied. Thus, X resources are no longer
   overriden by the defface spec which also fixes issues on win32 where
   the toolbar coloring was wrong because it is set through X resources
   and was (wrongfully) overriden.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/faces.el                  faces.el-20091113204419-o5vbwnq5f7feedwu-562
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-28 15:04:49 +0000
+++ b/lisp/ChangeLog    2014-04-28 19:14:17 +0000
@@ -1,3 +1,11 @@
+2014-04-27  Matthias Dahl  <address@hidden>
+
+       * faces.el (face-spec-recalc): Apply X resources only after the
+       the defface spec has been applied. Thus, X resources are no longer
+       overriden by the defface spec which also fixes issues on win32 where
+       the toolbar coloring was wrong because it is set through X resources
+       and was (wrongfully) overriden.  (Bug#16694)
+
 2014-04-28  Stefan Monnier  <address@hidden>
 
        * textmodes/rst.el (electric-pair-pairs): Declare.

=== modified file 'lisp/faces.el'
--- a/lisp/faces.el     2014-04-12 14:22:55 +0000
+++ b/lisp/faces.el     2014-04-28 19:14:17 +0000
@@ -1641,18 +1641,22 @@
 
 (defun face-spec-recalc (face frame)
   "Reset the face attributes of FACE on FRAME according to its specs.
-After the reset, the specs are applied from the following sources in this 
order:
-  X resources (if applicable)
+The following sources are applied in this order:
+
+  face reset to default values if it's the default face, otherwise set
+  to unspecifed (through `face-spec-reset-face`)
    |
   (theme and user customization)
-    or, if nonexistent or does not match the current frame,
+    or: if none of the above exist, do not match the current frame or
+        did inherit from the defface spec instead of overwriting it
+        entirely, the following is applied instead:
   (defface default spec)
+  (X resources (if applicable))
    |
   defface override spec"
   (while (get face 'face-alias)
     (setq face (get face 'face-alias)))
   (face-spec-reset-face face frame)
-  (make-face-x-resource-internal face frame)
   ;; If FACE is customized or themed, set the custom spec from
   ;; `theme-face' records.
   (let ((theme-faces (get face 'theme-face))
@@ -1666,10 +1670,12 @@
            (setq theme-face-applied t))))
     ;; If there was a spec applicable to FRAME, that overrides the
     ;; defface spec entirely (rather than inheriting from it).  If
-    ;; there was no spec applicable to FRAME, apply the defface spec.
+    ;; there was no spec applicable to FRAME, apply the defface spec
+    ;; as well as any applicable X resources.
     (unless theme-face-applied
       (setq spec (face-spec-choose (face-default-spec face) frame))
-      (face-spec-set-2 face frame spec))
+      (face-spec-set-2 face frame spec)
+      (make-face-x-resource-internal face frame))
     (setq spec (face-spec-choose (get face 'face-override-spec) frame))
     (face-spec-set-2 face frame spec)))
 


reply via email to

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