[Top][All Lists]

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

[elpa] externals/transient df1ba0f 05/11: transient-show-help: Cosmetics

From: Jonas Bernoulli
Subject: [elpa] externals/transient df1ba0f 05/11: transient-show-help: Cosmetics
Date: Thu, 4 Nov 2021 21:02:18 -0400 (EDT)

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

    transient-show-help: Cosmetics
 lisp/transient.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 584dc16..eac211e 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3279,11 +3279,10 @@ a prefix command, while porting a regular keymap to a 
 (cl-defmethod transient-show-help ((obj transient-prefix))
   "Show the info manual, manpage or command doc-string.
 Show the first one that is specified."
-  (if-let ((manual (oref obj info-manual)))
-      (transient--show-manual manual)
-    (if-let ((manpage (oref obj man-page)))
-        (transient--show-manpage manpage)
-      (transient--describe-function (oref obj command)))))
+  (with-slots (info-manual man-page command) obj
+    (cond (info-manual (transient--show-manual info-manual))
+          (man-page (transient--show-manpage man-page))
+          (t (transient--describe-function command)))))
 (cl-defmethod transient-show-help ((obj transient-suffix))
   "Show the command doc-string."
@@ -3301,8 +3300,10 @@ Show the first one that is specified."
   "Show the manpage if defined or the command doc-string.
 If the manpage is specified, then try to jump to the correct
-  (if-let ((manpage (oref transient--prefix man-page)))
-      (transient--show-manpage manpage (ignore-errors (oref obj argument)))
+  (if-let ((man-page (oref transient--prefix man-page))
+           (argument (and (slot-boundp obj 'argument)
+                          (oref obj argument))))
+      (transient--show-manpage man-page argument)
     (transient--describe-function this-command)))
 ;; `cl-generic-generalizers' doesn't support `command' et al.

reply via email to

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