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

    transient--get-face: Make suffix object available to face function
---
 lisp/transient.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 1e8819dc02..ff17c5101a 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1479,7 +1479,8 @@ drawing in the transient buffer.")
 
 (defvar transient--pending-suffix nil
   "The suffix that is currently being processed.
-This is bound while the suffix predicate is being evaluated.")
+This is bound while the suffix predicate is being evaluated,
+and while functions that return faces are being evaluated.")
 
 (defvar transient--pending-group nil
   "The group that is currently being processed.
@@ -3920,7 +3921,10 @@ If the OBJ's `key' is currently unreachable, then apply 
the face
              (face (slot-value obj slot)))
     (if (and (not (facep face))
              (functionp face))
-        (funcall face)
+        (let ((transient--pending-suffix obj))
+          (if (= (car (func-arity face)) 1)
+              (funcall face obj)
+            (funcall face)))
       face)))
 
 (defun transient--key-face (&optional cmd enforce-type)

Reply via email to