Skip to content

Commit 75830c8

Browse files
committed
Use single-arg form of signal to re-throw an error
Emacs 31.0.t0 supports this since [1: a1358530f53], which also adds `error-type-p'. So we check whether that exists to determine which form we can use. 1: 2026-03-10 a1358530f533a1151c7207e1ad634b1b9fae5a91 Improve the error API
1 parent adaf4e0 commit 75830c8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lisp/transient.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ from Emacs commit e680827e814e155cf79175d87ff7c6ee3a08b69a."
135135
,(macroexp-progn body))
136136
((debug error)
137137
(transient--emergency-exit ,id)
138-
(signal (car err) (cdr err)))))
138+
(static-if (fboundp 'error-type-p) ; since Emacs 31.1
139+
(signal err)
140+
(signal (car err) (cdr err))))))
139141

140142
(defun transient--exit-and-debug (&rest args)
141143
(transient--emergency-exit :debugger)

0 commit comments

Comments
 (0)