emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/engrave-faces 97c9ad7 25/36: When style is missing attr


From: ELPA Syncer
Subject: [elpa] externals/engrave-faces 97c9ad7 25/36: When style is missing attribute, don't check face
Date: Tue, 31 Aug 2021 01:57:28 -0400 (EDT)

branch: externals/engrave-faces
commit 97c9ad784afc3e9c7c5b21bfc566f8ddf9ba8f83
Author: TEC <tec@tecosaur.com>
Commit: TEC <tec@tecosaur.com>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]