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

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

[elpa] externals/transient b52c623217 177/366: transient--colorize-key:


From: Jonas Bernoulli
Subject: [elpa] externals/transient b52c623217 177/366: transient--colorize-key: New function
Date: Tue, 25 Jan 2022 18:54:38 -0500 (EST)

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

    transient--colorize-key: New function
---
 lisp/transient.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 8c1a2ccb99..2f4250c377 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2818,15 +2818,19 @@ Optional support for popup buttons is also implemented 
here."
                 (setq suf (replace-regexp-in-string " " "" suf)))
               (concat (propertize pre 'face 'default)
                       (and (string-prefix-p (concat pre " ") key) " ")
-                      (propertize suf 'face 'transient-key)
+                      (transient--colorize-key suf)
                       (save-excursion
                         (when (string-match " +\\'" key)
                           (match-string 0 key))))))
            ((transient--lookup-key transient-sticky-map (kbd key))
-            (propertize key 'face 'transient-key))
+            (transient--colorize-key key))
            (t
             (propertize key 'face 'transient-unreachable-key))))
-      (propertize key 'face 'transient-key))))
+      (transient--colorize-key key))))
+
+(defun transient--colorize-key (key)
+  (propertize key 'face
+              'transient-key))
 
 (cl-defmethod transient-format-key :around ((obj transient-argument))
   (let ((key (cl-call-next-method obj)))



reply via email to

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