[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 7f0215c4df 22/26: transient-format-value(opti
|
From: |
Jonas Bernoulli |
|
Subject: |
[elpa] externals/transient 7f0215c4df 22/26: transient-format-value(option, value): Use argument faces |
|
Date: |
Sun, 26 Nov 2023 19:42:11 -0500 (EST) |
branch: externals/transient
commit 7f0215c4dfda146de0fda663eb2319134534243c
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-format-value(option,value): Use argument faces
---
lisp/transient.el | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 558ea8efca..24db9105b9 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3816,22 +3816,30 @@ If the OBJ's `key' is currently unreachable, then apply
the face
(cl-defmethod transient-format-value ((obj transient-option))
(let ((argument (oref obj argument)))
(if-let ((value (oref obj value)))
- (propertize
- (cl-ecase (oref obj multi-value)
- ((nil) (concat argument value))
- ((t rest) (concat argument
- (and (not (string-suffix-p " " argument)) " ")
- (mapconcat #'prin1-to-string value " ")))
- (repeat (mapconcat (lambda (v) (concat argument v)) value " ")))
- 'face 'transient-value)
- (propertize argument 'face 'transient-inactive-value))))
+ (cl-ecase (oref obj multi-value)
+ ((nil)
+ (concat (propertize argument 'face 'transient-argument)
+ (propertize value 'face 'transient-value)))
+ ((t rest)
+ (concat (propertize (if (string-suffix-p " " argument)
+ argument
+ (concat argument " "))
+ 'face 'transient-argument)
+ (propertize (mapconcat #'prin1-to-string value " ")
+ 'face 'transient-value)))
+ (repeat
+ (mapconcat (lambda (value)
+ (concat (propertize argument 'face 'transient-argument)
+ (propertize value 'face 'transient-value)))
+ value " ")))
+ (propertize argument 'face 'transient-inactive-argument))))
(cl-defmethod transient-format-value ((obj transient-switches))
(with-slots (value argument-format choices) obj
(format (propertize argument-format
'face (if value
- 'transient-value
- 'transient-inactive-value))
+ 'transient-argument
+ 'transient-inactive-argument))
(format
(propertize "[%s]" 'face 'transient-delimiter)
(mapconcat
- [elpa] externals/transient 9c00fae158 10/26: transient--add-face: Move definition, (continued)
- [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
- [elpa] externals/transient 46813a03f6 23/26: In support of the lovely pcase, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 307695d2df 21/26: transient-format-description(around:suffix): Combine faces, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 7f0215c4df 22/26: transient-format-value(option, value): Use argument faces,
Jonas Bernoulli <=
- [elpa] externals/transient d834f76492 20/26: transient-format(around:suffix): Don't attempt to highlight full line, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient 71d16d86f1 25/26: Improve looks of debugging faces, Jonas Bernoulli, 2023/11/26
- [elpa] externals/transient af6eb31054 26/26: transient-format: Only highlight infix if minibuffer is used, Jonas Bernoulli, 2023/11/26