summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-01-21 20:00:04 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-01-21 20:00:04 +0100
commit9d8f361f6a16503ff82e6076596874731aedb48f (patch)
tree3ebb969f0df53ec9e36978781a8d2db0bcd025fe
parent194139cdfda4ea398c200c652a86916fa3729e05 (diff)
transient--wrap-command: Bind debugger
Without this the transient window would not be deleted when the debugger is entered.
-rw-r--r--lisp/transient.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index aa2eab3..f618564 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2336,7 +2336,8 @@ value. Otherwise return CHILDREN as is."
(lambda (spec)
(let ((abort t))
(unwind-protect
- (prog1 (advice-eval-interactive-spec spec)
+ (prog1 (let ((debugger #'transient--exit-and-debug))
+ (advice-eval-interactive-spec spec))
(setq abort nil))
(when abort
(when-let ((unwind (oref prefix unwind-suffix)))
@@ -2345,7 +2346,8 @@ value. Otherwise return CHILDREN as is."
(advice-remove suffix advice)
(oset prefix unwind-suffix nil))))))
(unwind-protect
- (apply fn args)
+ (let ((debugger #'transient--exit-and-debug))
+ (apply fn args))
(when-let ((unwind (oref prefix unwind-suffix)))
(transient--debug 'unwind-command)
(funcall unwind suffix))
@@ -2361,7 +2363,8 @@ value. Otherwise return CHILDREN as is."
(lambda (spec)
(let ((abort t))
(unwind-protect
- (prog1 (advice-eval-interactive-spec spec)
+ (prog1 (let ((debugger #'transient--exit-and-debug))
+ (advice-eval-interactive-spec spec))
(setq abort nil))
(when abort
(when-let ((unwind (oref prefix unwind-suffix)))
@@ -2372,7 +2375,8 @@ value. Otherwise return CHILDREN as is."
(advice-body
(lambda (fn &rest args)
(unwind-protect
- (apply fn args)
+ (let ((debugger #'transient--exit-and-debug))
+ (apply fn args))
(when-let ((unwind (oref prefix unwind-suffix)))
(transient--debug 'unwind-command)
(funcall unwind suffix))