diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-21 14:47:59 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-21 14:47:59 +0100 |
| commit | 75830c8c62c34c8692239d51e999ed48b341d244 (patch) | |
| tree | 11c6455ebc9fef07fde09f7d59ec1b66d4c05e2e | |
| parent | adaf4e06e541745216bfabf8c4af1812f15ae7d1 (diff) | |
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
| -rw-r--r-- | lisp/transient.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/transient.el b/lisp/transient.el index eda4265..cea49bb 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -135,7 +135,9 @@ from Emacs commit e680827e814e155cf79175d87ff7c6ee3a08b69a." ,(macroexp-progn body)) ((debug error) (transient--emergency-exit ,id) - (signal (car err) (cdr err))))) + (static-if (fboundp 'error-type-p) ; since Emacs 31.1 + (signal err) + (signal (car err) (cdr err)))))) (defun transient--exit-and-debug (&rest args) (transient--emergency-exit :debugger) |
