diff options
| author | Matthias Dahl | 2014-04-05 10:15:11 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-04-05 10:15:11 +0300 |
| commit | eb7a03cc7672f8179b9d1a403bb019e753ed907f (patch) | |
| tree | 6e38fc132dd12c1d37d9b0f3a0c6eca27d34e455 | |
| parent | 3ccd4eafd3d51285b2d9eb4e5e83b3be20dbfe9f (diff) | |
| download | emacs-eb7a03cc7672f8179b9d1a403bb019e753ed907f.tar.gz emacs-eb7a03cc7672f8179b9d1a403bb019e753ed907f.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/faces.el | 15 |
2 files changed, 17 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ab920990b4..a74e121c6bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-04-05 Matthias Dahl <ml_emacs-lists@binary-island.eu> | ||
| 2 | |||
| 3 | * faces.el (face-spec-recalc): Call make-face-x-resource-internal | ||
| 4 | only when inhibit-x-resources is nil, and do that earlier in the | ||
| 5 | function. Doc fix. (Bug#16694) | ||
| 6 | |||
| 1 | 2014-04-04 Tassilo Horn <tsdh@gnu.org> | 7 | 2014-04-04 Tassilo Horn <tsdh@gnu.org> |
| 2 | 8 | ||
| 3 | * doc-view.el (doc-view-bookmark-jump): Use | 9 | * doc-view.el (doc-view-bookmark-jump): Use |
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." | |||
| 1619 | 1619 | ||
| 1620 | (defun face-spec-recalc (face frame) | 1620 | (defun face-spec-recalc (face frame) |
| 1621 | "Reset the face attributes of FACE on FRAME according to its specs. | 1621 | "Reset the face attributes of FACE on FRAME according to its specs. |
| 1622 | This applies the defface/custom spec first, then the custom theme specs, | 1622 | After the reset, the specs are applied from the following sources in this order: |
| 1623 | then the override spec." | 1623 | X resources (if applicable) |
| 1624 | | | ||
| 1625 | (theme and user customization) | ||
| 1626 | or, if nonexistent or does not match the current frame, | ||
| 1627 | (defface default spec) | ||
| 1628 | | | ||
| 1629 | defface override spec" | ||
| 1624 | (while (get face 'face-alias) | 1630 | (while (get face 'face-alias) |
| 1625 | (setq face (get face 'face-alias))) | 1631 | (setq face (get face 'face-alias))) |
| 1626 | (face-spec-reset-face face frame) | 1632 | (face-spec-reset-face face frame) |
| 1633 | (unless inhibit-x-resources | ||
| 1634 | (make-face-x-resource-internal face frame)) | ||
| 1627 | ;; If FACE is customized or themed, set the custom spec from | 1635 | ;; If FACE is customized or themed, set the custom spec from |
| 1628 | ;; `theme-face' records. | 1636 | ;; `theme-face' records. |
| 1629 | (let ((theme-faces (get face 'theme-face)) | 1637 | (let ((theme-faces (get face 'theme-face)) |
| @@ -1641,8 +1649,7 @@ then the override spec." | |||
| 1641 | (setq spec (face-spec-choose (face-default-spec face) frame)) | 1649 | (setq spec (face-spec-choose (face-default-spec face) frame)) |
| 1642 | (face-spec-set-2 face frame spec)) | 1650 | (face-spec-set-2 face frame spec)) |
| 1643 | (setq spec (face-spec-choose (get face 'face-override-spec) frame)) | 1651 | (setq spec (face-spec-choose (get face 'face-override-spec) frame)) |
| 1644 | (face-spec-set-2 face frame spec)) | 1652 | (face-spec-set-2 face frame spec))) |
| 1645 | (make-face-x-resource-internal face frame)) | ||
| 1646 | 1653 | ||
| 1647 | (defun face-spec-set-2 (face frame spec) | 1654 | (defun face-spec-set-2 (face frame spec) |
| 1648 | "Set the face attributes of FACE on FRAME according to SPEC." | 1655 | "Set the face attributes of FACE on FRAME according to SPEC." |