diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-01-13 17:25:19 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-01-13 17:27:03 +0100 |
| commit | 3ebb6acfae3a08a747146606d7ae6ab7bf5fa305 (patch) | |
| tree | 7f6a063c374f436f91f925c5d403f5115e4a9092 | |
| parent | a2fe06ac00d419ddcbf8f9ef59bf1c4d2350ccbe (diff) | |
transient-infix-read: Signal error if called with non-suffix symbol
Previously this resulted in an `excessive-lisp-nesting' error.
| -rw-r--r-- | lisp/transient.el | 6 |
1 files 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 |
