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

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

[elpa] externals/transient cf32cf6f98 39/41: transient--get-face: Favor


From: Jonas Bernoulli
Subject: [elpa] externals/transient cf32cf6f98 39/41: transient--get-face: Favor face over function
Date: Sun, 12 Nov 2023 20:04:10 -0500 (EST)

branch: externals/transient
commit cf32cf6f988043a6ffd7429fde5a42dbd89e1664
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    transient--get-face: Favor face over function
    
    If the value of the slot is a symbol for which `facep' returns
    non-nil, then use that as-is, even if there also exists a function
    by the same name.  Without this it wouldn't be possible to use the
    `error' face, for example.
---
 lisp/transient.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 45d233bd77..27f83f29d4 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3812,7 +3812,8 @@ If the OBJ's `key' is currently unreachable, then apply 
the face
   (and-let* ((! (slot-exists-p obj slot))
              (! (slot-boundp   obj slot))
              (face (slot-value obj slot)))
-    (if (functionp face)
+    (if (and (not (facep face))
+             (functionp face))
         (funcall face)
       face)))
 



reply via email to

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