branch: externals/transient
commit b1b15bed496eafdf2075765207fe0289885120a9
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    transient-help: Cosmetics
---
 lisp/transient.el | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index db67cbc22b..ca28aeb5fa 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3425,21 +3425,22 @@ transient is active."
 
 ;;;; Help
 
-(defun transient-help (&optional interactive)
+(defun transient-help (&optional interactivep)
   "Show help for the active transient or one of its suffixes.
 \n(fn)"
   (interactive (list t))
-  (if interactive
-      (setq transient--helpp t)
+  (cond
+   (interactivep
+    (setq transient--helpp t))
+   ((lookup-key transient--transient-map
+                (this-single-command-raw-keys))
+    (setq transient--helpp nil)
     (with-demoted-errors "transient-help: %S"
-      (when (lookup-key transient--transient-map
-                        (this-single-command-raw-keys))
-        (setq transient--helpp nil)
-        (transient--display-help #'transient-show-help
-                                 (if (eq this-original-command 'transient-help)
-                                     transient--prefix
-                                   (or (transient-suffix-object)
-                                       this-original-command)))))))
+      (transient--display-help #'transient-show-help
+                               (if (eq this-original-command 'transient-help)
+                                   transient--prefix
+                                 (or (transient-suffix-object)
+                                     this-original-command)))))))
 
 (transient-define-suffix transient-describe ()
   "From a transient menu, describe something in another buffer.

Reply via email to