diff options
author | Matthias Dahl <ml_emacs-lists@binary-island.eu> | 2014-04-05 10:15:11 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2014-04-05 10:15:11 +0300 |
commit | eb7a03cc7672f8179b9d1a403bb019e753ed907f (patch) | |
tree | 6e38fc132dd12c1d37d9b0f3a0c6eca27d34e455 /lisp/faces.el | |
parent | 3ccd4eafd3d51285b2d9eb4e5e83b3be20dbfe9f (diff) | |
download | emacs-eb7a03cc7672f8179b9d1a403bb019e753ed907f.tar.gz |
Fix bug #16694 with theme face precedence.
lisp/faces.el (face-spec-recalc): Call make-face-x-resource-internal
only when inhibit-x-resources is nil, and do that earlier in the
function. Doc fix.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r-- | lisp/faces.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index e008993b49f..c6dd8d7a2d5 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 inhibit-x-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." |