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

[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)



reply via email to

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