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

    transient-get-summary: Cosmetics
---
 lisp/transient.el | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index af4cae913d..f4191f89a5 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -5264,23 +5264,24 @@ If RETURN is non-nil, return the summary instead of 
showing it.
 This is used when a tooltip is needed.")
 
 (cl-defmethod transient-get-summary ((obj transient-object))
-  (let ((summary (oref obj summary))
-        (command (ignore-error (invalid-slot-name unbound-slot)
-                   (oref obj command))))
-    (when-let*
-        ((doc (cond ((functionp summary)
-                     (funcall summary obj))
-                    (summary)
-                    ((and command (documentation command))
-                     (car (split-string (documentation command) "\n")))))
-         (_(stringp doc))
-         (_(not (equal doc
-                       (car (split-string (documentation
-                                           'transient--default-infix-command)
-                                          "\n"))))))
-      (if (string-suffix-p "." doc)
-          (substring doc 0 -1)
-        doc))))
+  (and-let*
+    ([summary (cond-let*
+                [[summary (oref obj summary)]]
+                ((functionp summary)
+                 (funcall summary obj))
+                (summary)
+                ([command (ignore-error (invalid-slot-name unbound-slot)
+                            (oref obj command))]
+                 [_(documentation command)]
+                 (car (split-string (documentation command) "\n"))))]
+     [_(stringp summary)]
+     [_(not (equal summary
+                   (car (split-string (documentation
+                                       'transient--default-infix-command)
+                                      "\n"))))]
+     (if (string-suffix-p "." summary)
+         (substring summary 0 -1)
+       summary))))
 
 ;;; Menu Navigation
 

Reply via email to