diff options
| author | Juanma Barranquero | 2014-04-30 21:54:52 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2014-04-30 21:54:52 +0200 |
| commit | 09b911adf4e22bbcac8c588bc14ade801276732e (patch) | |
| tree | 0d9eb9708479bb491d7e1e2bb030aa3e90299526 /lisp/faces.el | |
| parent | b0e36b7048c88aa24f6955c53fbe790bb9ebc54f (diff) | |
| parent | 426b5dafdd837328d624a8ec5bfd567f2865c9f5 (diff) | |
| download | emacs-09b911adf4e22bbcac8c588bc14ade801276732e.tar.gz emacs-09b911adf4e22bbcac8c588bc14ade801276732e.zip | |
Merge from emacs-24; up to 2014-05-01T10:21:17Z!rgm@gnu.org
Diffstat (limited to 'lisp/faces.el')
| -rw-r--r-- | lisp/faces.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 9c115473542..d8b3c7a6b0f 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1652,18 +1652,22 @@ function for its other effects." | |||
| 1652 | 1652 | ||
| 1653 | (defun face-spec-recalc (face frame) | 1653 | (defun face-spec-recalc (face frame) |
| 1654 | "Reset the face attributes of FACE on FRAME according to its specs. | 1654 | "Reset the face attributes of FACE on FRAME according to its specs. |
| 1655 | After the reset, the specs are applied from the following sources in this order: | 1655 | The following sources are applied in this order: |
| 1656 | X resources (if applicable) | 1656 | |
| 1657 | face reset to default values if it's the default face, otherwise set | ||
| 1658 | to unspecified (through `face-spec-reset-face') | ||
| 1657 | | | 1659 | | |
| 1658 | (theme and user customization) | 1660 | (theme and user customization) |
| 1659 | or, if nonexistent or does not match the current frame, | 1661 | or: if none of the above exist, and none match the current frame or |
| 1662 | inherited from the defface spec instead of overwriting it | ||
| 1663 | entirely, the following is applied instead: | ||
| 1660 | (defface default spec) | 1664 | (defface default spec) |
| 1665 | (X resources (if applicable)) | ||
| 1661 | | | 1666 | | |
| 1662 | defface override spec" | 1667 | defface override spec" |
| 1663 | (while (get face 'face-alias) | 1668 | (while (get face 'face-alias) |
| 1664 | (setq face (get face 'face-alias))) | 1669 | (setq face (get face 'face-alias))) |
| 1665 | (face-spec-reset-face face frame) | 1670 | (face-spec-reset-face face frame) |
| 1666 | (make-face-x-resource-internal face frame) | ||
| 1667 | ;; If FACE is customized or themed, set the custom spec from | 1671 | ;; If FACE is customized or themed, set the custom spec from |
| 1668 | ;; `theme-face' records. | 1672 | ;; `theme-face' records. |
| 1669 | (let ((theme-faces (get face 'theme-face)) | 1673 | (let ((theme-faces (get face 'theme-face)) |
| @@ -1677,10 +1681,12 @@ After the reset, the specs are applied from the following sources in this order: | |||
| 1677 | (setq theme-face-applied t)))) | 1681 | (setq theme-face-applied t)))) |
| 1678 | ;; If there was a spec applicable to FRAME, that overrides the | 1682 | ;; If there was a spec applicable to FRAME, that overrides the |
| 1679 | ;; defface spec entirely (rather than inheriting from it). If | 1683 | ;; defface spec entirely (rather than inheriting from it). If |
| 1680 | ;; there was no spec applicable to FRAME, apply the defface spec. | 1684 | ;; there was no spec applicable to FRAME, apply the defface spec |
| 1685 | ;; as well as any applicable X resources. | ||
| 1681 | (unless theme-face-applied | 1686 | (unless theme-face-applied |
| 1682 | (setq spec (face-spec-choose (face-default-spec face) frame)) | 1687 | (setq spec (face-spec-choose (face-default-spec face) frame)) |
| 1683 | (face-spec-set-2 face frame spec)) | 1688 | (face-spec-set-2 face frame spec) |
| 1689 | (make-face-x-resource-internal face frame)) | ||
| 1684 | (setq spec (face-spec-choose (get face 'face-override-spec) frame)) | 1690 | (setq spec (face-spec-choose (get face 'face-override-spec) frame)) |
| 1685 | (face-spec-set-2 face frame spec))) | 1691 | (face-spec-set-2 face frame spec))) |
| 1686 | 1692 | ||