diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/faces.el | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index dc5bcca7609..0f31628f5f9 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1669,7 +1669,7 @@ The following sources are applied in this order: | |||
| 1669 | ;; `theme-face' records. | 1669 | ;; `theme-face' records. |
| 1670 | (let ((theme-faces (get face 'theme-face)) | 1670 | (let ((theme-faces (get face 'theme-face)) |
| 1671 | (no-match-found 0) | 1671 | (no-match-found 0) |
| 1672 | face-attrs theme-face-applied) | 1672 | default-attrs face-attrs theme-face-applied) |
| 1673 | (if theme-faces | 1673 | (if theme-faces |
| 1674 | (dolist (elt (reverse theme-faces)) | 1674 | (dolist (elt (reverse theme-faces)) |
| 1675 | (setq face-attrs (face-spec-choose (cadr elt) frame no-match-found)) | 1675 | (setq face-attrs (face-spec-choose (cadr elt) frame no-match-found)) |
| @@ -1677,13 +1677,20 @@ The following sources are applied in this order: | |||
| 1677 | (face-spec-set-2 face frame face-attrs) | 1677 | (face-spec-set-2 face frame face-attrs) |
| 1678 | (setq theme-face-applied t)))) | 1678 | (setq theme-face-applied t)))) |
| 1679 | ;; If there was a spec applicable to FRAME, that overrides the | 1679 | ;; If there was a spec applicable to FRAME, that overrides the |
| 1680 | ;; defface spec entirely (rather than inheriting from it). If | 1680 | ;; defface spec entirely rather than inheriting from it, with the |
| 1681 | ;; there was no spec applicable to FRAME, apply the defface spec | 1681 | ;; exception of the :extend attribute (which is inherited). |
| 1682 | ;; as well as any applicable X resources. | 1682 | ;; |
| 1683 | ;; If there was no spec applicable to FRAME, apply the defface | ||
| 1684 | ;; spec as well as any applicable X resources. | ||
| 1685 | (setq default-attrs (face-spec-choose (face-default-spec face) frame)) | ||
| 1683 | (unless theme-face-applied | 1686 | (unless theme-face-applied |
| 1684 | (setq face-attrs (face-spec-choose (face-default-spec face) frame)) | 1687 | (face-spec-set-2 face frame default-attrs) |
| 1685 | (face-spec-set-2 face frame face-attrs) | ||
| 1686 | (make-face-x-resource-internal face frame)) | 1688 | (make-face-x-resource-internal face frame)) |
| 1689 | (when (and theme-face-applied | ||
| 1690 | (eq 'unspecified (face-attribute face :extend frame t))) | ||
| 1691 | (let ((tail (plist-member default-attrs :extend))) | ||
| 1692 | (and tail (face-spec-set-2 face frame | ||
| 1693 | (list :extend (cadr tail)))))) | ||
| 1687 | (setq face-attrs (face-spec-choose (get face 'face-override-spec) frame)) | 1694 | (setq face-attrs (face-spec-choose (get face 'face-override-spec) frame)) |
| 1688 | (face-spec-set-2 face frame face-attrs))) | 1695 | (face-spec-set-2 face frame face-attrs))) |
| 1689 | 1696 | ||