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

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

[elpa] externals/transient fdd0532575 06/17: transient-format(around:suf


From: Jonas Bernoulli
Subject: [elpa] externals/transient fdd0532575 06/17: transient-format(around:suffix): Cosmetics
Date: Tue, 21 Nov 2023 10:17:46 -0500 (EST)

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

    transient-format(around:suffix): Cosmetics
---
 lisp/transient.el | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 44c153e397..8a030c82cf 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3622,20 +3622,20 @@ making `transient--original-buffer' current.")
 (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."
-  (let ((str (concat
-              (and transient--editp
-                   (let ((level (oref obj level)))
-                     (propertize (format " %s " level)
-                                 'face (if (transient--use-level-p level t)
-                                           'transient-enabled-suffix
-                                         'transient-disabled-suffix))))
-              (cl-call-next-method obj))))
-    (if (and transient-enable-popup-navigation
-             (slot-boundp obj 'command))
-        (make-text-button str nil
-                          'type 'transient
-                          'command (oref obj command))
-      str)))
+  (let ((str (cl-call-next-method obj)))
+    (when transient--editp
+      (setq str (concat (let ((level (oref obj level)))
+                          (propertize (format " %s " level)
+                                      'face (if (transient--use-level-p level 
t)
+                                                'transient-enabled-suffix
+                                              'transient-disabled-suffix)))
+                        str)))
+    (when (and transient-enable-popup-navigation
+               (slot-boundp obj 'command))
+      (setq str (make-text-button str nil
+                                  'type 'transient
+                                  'command (oref obj command))))
+    str))
 
 (cl-defmethod transient-format ((obj transient-infix))
   "Return a string generated using OBJ's `format'.



reply via email to

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