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

    transient-infix-read: Signal error if called with non-suffix symbol
    
    Previously this resulted in an `excessive-lisp-nesting' error.
---
 lisp/transient.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index f4fd0a06e1..02b847906d 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3179,8 +3179,10 @@ The last value is \"don't use any of these switches\"."
   "Elsewhere use the reader of the infix command COMMAND.
 Use this if you want to share an infix's history with a regular
 stand-alone command."
-  (cl-letf (((symbol-function #'transient--show) #'ignore))
-    (transient-infix-read (transient--suffix-prototype command))))
+  (if-let ((obj (transient--suffix-prototype command)))
+      (cl-letf (((symbol-function #'transient--show) #'ignore))
+        (transient-infix-read obj))
+    (error "Not a suffix command: `%s'" command)))
 
 ;;;; Readers
 

Reply via email to