From 3ebb6acfae3a08a747146606d7ae6ab7bf5fa305 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Sat, 13 Jan 2024 17:25:19 +0100 Subject: 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 f4fd0a0..02b8479 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 -- cgit v1.0