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

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

[elpa] externals/transient 3ebb6acfae 1/4: transient-infix-read: Signal


From: Jonas Bernoulli
Subject: [elpa] externals/transient 3ebb6acfae 1/4: transient-infix-read: Signal error if called with non-suffix symbol
Date: Mon, 15 Jan 2024 16:04:02 -0500 (EST)

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

    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

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