From: Matthias Dahl Date: Sat, 22 Mar 2014 08:18:42 +0000 (+0200) Subject: Fix bug #16694 with face attributes changed by themes. X-Git-Tag: emacs-24.3.90~123 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c326d7116781cc22383c1367de720068a42a8cf;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 516261666df..1efd847dc89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-03-22 Matthias Dahl + + * 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 * w32-common-fns.el (x-selection-owner-p): Add empty docstring for the diff --git a/lisp/faces.el b/lisp/faces.el index e008993b49f..145ac398868 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1619,11 +1619,19 @@ function for its other effects." (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 @@ then the override spec." (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."