emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r116827: Fix bug #16694 with face attributes chan


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 r116827: Fix bug #16694 with face attributes changed by themes.
Date: Sat, 22 Mar 2014 08:19:17 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116827
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: Sat 2014-03-22 10:18:42 +0200
message:
  Fix bug #16694 with face attributes changed by themes.
  
   lisp/faces.el (face-spec-recalc): Doc fix.  Call
   make-face-x-resource-internal earlier, and condition that on
   no-init-from-resources being nil.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/faces.el                  faces.el-20091113204419-o5vbwnq5f7feedwu-562
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-22 00:24:00 +0000
+++ b/lisp/ChangeLog    2014-03-22 08:18:42 +0000
@@ -1,3 +1,9 @@
+2014-03-22  Matthias Dahl  <address@hidden>
+
+       * faces.el (face-spec-recalc): Doc fix.  Call
+       make-face-x-resource-internal earlier, and condition that on
+       no-init-from-resources being nil. (Bug#16694)
+
 2014-03-22  Juanma Barranquero  <address@hidden>
 
        * w32-common-fns.el (x-selection-owner-p): Add empty docstring for the

=== modified file 'lisp/faces.el'
--- a/lisp/faces.el     2014-02-26 19:40:56 +0000
+++ b/lisp/faces.el     2014-03-22 08:18:42 +0000
@@ -1619,11 +1619,19 @@
 
 (defun face-spec-recalc (face frame)
   "Reset the face attributes of FACE on FRAME according to its specs.
-This applies the defface/custom spec first, then the custom theme specs,
-then the override spec."
+After the reset, the specs are applied from the following sources in this 
order:
+  X resources (if applicable)
+   |
+  (theme and user customization) 
+    or, if nonexistent or does not match the current frame, 
+  (defface default spec)
+   |
+  defface override spec"
   (while (get face 'face-alias)
     (setq face (get face 'face-alias)))
   (face-spec-reset-face face frame)
+  (unless no-init-from-resources
+    (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))
@@ -1641,8 +1649,7 @@
       (setq spec (face-spec-choose (face-default-spec face) frame))
       (face-spec-set-2 face frame spec))
     (setq spec (face-spec-choose (get face 'face-override-spec) frame))
-    (face-spec-set-2 face frame spec))
-  (make-face-x-resource-internal face frame))
+    (face-spec-set-2 face frame spec)))
 
 (defun face-spec-set-2 (face frame spec)
   "Set the face attributes of FACE on FRAME according to SPEC."


reply via email to

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