[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 7da468ef9d 07/17: transient-format(around:suf
|
From: |
Jonas Bernoulli |
|
Subject: |
[elpa] externals/transient 7da468ef9d 07/17: transient-format(around:suffix): Absorb around:infix method |
|
Date: |
Tue, 21 Nov 2023 10:17:47 -0500 (EST) |
branch: externals/transient
commit 7da468ef9d492d5e95853bd3871317bdc5feea21
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-format(around:suffix): Absorb around:infix method
---
lisp/transient.el | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 8a030c82cf..0e9d94cc15 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3611,18 +3611,17 @@ making `transient--original-buffer' current.")
"Return a string containing just the ARG character."
(char-to-string arg))
-(cl-defmethod transient-format :around ((obj transient-infix))
- "When reading user input for this infix, then highlight it."
- (let ((str (cl-call-next-method obj)))
- (if (eq (oref obj command) this-original-command)
- (transient--add-face (concat str "\n") 'transient-active-infix nil
- (if (eq this-command 'transient-set-level) 3 0))
- str)))
-
(cl-defmethod transient-format :around ((obj transient-suffix))
- "When edit-mode is enabled, then prepend the level information.
-Optional support for popup buttons is also implemented here."
+ "Add additional formatting if appropriate.
+When reading user input for this infix, then highlight it.
+When edit-mode is enabled, then prepend the level information.
+When `transient-enable-popup-navigation' is non-nil then format
+ as a button."
(let ((str (cl-call-next-method obj)))
+ (when (and (cl-typep obj 'transient-infix)
+ (eq (oref obj command) this-original-command))
+ (setq str (transient--add-face (concat str "\n")
+ 'transient-active-infix)))
(when transient--editp
(setq str (concat (let ((level (oref obj level)))
(propertize (format " %s " level)
- [elpa] externals/transient updated (3cd1de1695 -> 57bb749f98), Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 43e9c16d0c 05/17: Next release will be 0.5.0, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 609dabfdac 02/17: transient-prefix: Add experimental transient-switch-frame slot, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient c7daf2d34e 03/17: Make shadowed buffer current when calling a group's hide function, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient d39916a43d 08/17: transient-help: Propertize key binding in message, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 7bb6f670fa 09/17: Move definition of transient button-type, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient a53205c51b 10/17: Move definition of transient--restore-winconf, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 7da468ef9d 07/17: transient-format(around:suffix): Absorb around:infix method,
Jonas Bernoulli <=
- [elpa] externals/transient c885d12b54 15/17: Move definition of transient-resume-mode-map, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 413f76a783 16/17: Collect most commands in one section, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient fdd0532575 06/17: transient-format(around:suffix): Cosmetics, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient ee26a40301 14/17: Move definition of transient-toggle-common, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 57bb749f98 17/17: Remove obsolete function alias transient--current-buffer after all, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 38c548e06b 04/17: Keep obsolete transient--current-buffer for one release, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient c55defa145 01/17: Account for shorthands when determining handle-switch-frame predicate, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 45fd93d972 11/17: Move definitions of transient-scroll-{up, down}, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 923246d174 12/17: Move definition of transient-popup-navigation-help, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 82bc29d29f 13/17: transient-inhibit-move: Rename and improve strings, Jonas Bernoulli, 2023/11/21