[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 0509c90e53 11/26: transient--key-face: New fu
|
From: |
Jonas Bernoulli |
|
Subject: |
[elpa] externals/transient 0509c90e53 11/26: transient--key-face: New function |
|
Date: |
Sun, 26 Nov 2023 19:42:03 -0500 (EST) |
branch: externals/transient
commit 0509c90e5363ebc51b91cc9ebe1a7d7dab93b632
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--key-face: New function
Replacing `transient--colorize-key'.
---
lisp/transient.el | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index b9cdbb29bf..ccc7c5befa 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3742,22 +3742,16 @@ When `transient-enable-popup-navigation' is non-nil
then format
(setq suf (string-replace " " "" suf)))
(concat (propertize pre 'face 'transient-unreachable-key)
(and (string-prefix-p (concat pre " ") key) " ")
- (transient--colorize-key suf cmd)
+ (propertize suf 'face (transient--key-face cmd))
(save-excursion
(and (string-match " +\\'" key)
(propertize (match-string 0 key)
'face 'fixed-pitch))))))
((transient--lookup-key transient-sticky-map (kbd key))
- (transient--colorize-key key cmd))
+ (propertize key 'face (transient--key-face cmd)))
(t
(propertize key 'face 'transient-unreachable-key))))
- (transient--colorize-key key cmd))))
-
-(defun transient--colorize-key (key command)
- (propertize key 'face
- (or (and (transient--semantic-coloring-p)
- (transient--suffix-color command))
- 'transient-key)))
+ (propertize key 'face (transient--key-face cmd)))))
(cl-defmethod transient-format-key :around ((obj transient-argument))
"Handle `transient-highlight-mismatched-keys'."
@@ -3875,6 +3869,11 @@ If the OBJ's `key' is currently unreachable, then apply
the face
(funcall face)
face)))
+(defun transient--key-face (&optional cmd)
+ (or (and (transient--semantic-coloring-p)
+ (transient--suffix-color cmd))
+ 'transient-key))
+
(defun transient--key-unreachable-p (obj)
(and transient--redisplay-key
(let ((key (oref obj key)))
- [elpa] externals/transient updated (57bb749f98 -> af6eb31054), Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 7d9d639cdf 01/26: make: Only append newline to transient.texi if missing, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient ff496fe5ad 04/26: manual: Use "documentation string" instead of "doc string", Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 44792c2bf9 03/26: manual: Copy-edit, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 163d0a83f7 02/26: manual: Regenerate texi file, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 004ca25946 06/26: Move definition of functions that handle pre-commands, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient f23f51e24e 07/26: Rename transient--{do => call}-pre-command, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 37307c1b8c 05/26: transient-prefix-object: New function, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 4c1cda9984 08/26: Rename transient-get-{predicate-for => pre-command}, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient f4b4dd42b9 14/26: Add transient--do-leave's missing color setting, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 0509c90e53 11/26: transient--key-face: New function,
Jonas Bernoulli <=
- [elpa] externals/transient 05754d1576 13/26: Rearrange pre-command color settings, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 98d8cf8016 15/26: Fix transient--do-quit-one's color setting, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 9c00fae158 10/26: transient--add-face: Move definition, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient b1951a87b5 09/26: transient--resolve-pre-command: Optionally resolve boolean as well, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 9a21467706 12/26: transient--separator-line: New function, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 47d3f01d9f 17/26: Fix/improve some faces, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient ad7a098349 16/26: Rearrange face definitions, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient c8a9ac5124 18/26: Simplify how colors are used to indicate transient behavior, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 9f3afe94a9 19/26: transient-format(around:suffix): Reformat docstring, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 48a1aa2bea 24/26: transient-highlight-mismatched-keys: Fix docstring typos, Jonas Bernoulli, 2023/11/26