branch: externals/engrave-faces
commit 97c9ad784afc3e9c7c5b21bfc566f8ddf9ba8f83
Author: TEC <[email protected]>
Commit: TEC <[email protected]>
When style is missing attribute, don't check face
Otherwise you can get a weird mix of properties.
---
engrave-faces.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/engrave-faces.el b/engrave-faces.el
index e173ffb..01f187f 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -205,10 +205,11 @@ To consider inheritence, use
`engrave-faces-explicit-inheritance' first."
(delq nil (delq 'unspecified
(mapcar
(lambda (face)
- (or (plist-get (cdr (assoc face
engrave-faces-preset-styles)) attribute)
- (cond
- ((symbolp face) (face-attribute face attribute nil
nil))
- ((listp face) (plist-get face attribute)))))
+ (if-let ((style (cdr (assoc face
engrave-faces-preset-styles))))
+ (plist-get style attribute)
+ (cond
+ ((symbolp face) (face-attribute face attribute nil
nil))
+ ((listp face) (plist-get face attribute)))))
(delq 'default (if (listp faces) faces (list faces)))))))
(defun engrave-faces-next-face-change (pos &optional limit)