From 2660b9d29b651aa60735e9875f64c573e71bbad8 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 31 Oct 2024 02:45:26 +0100 Subject: [PATCH] transient--premature-post-command failed to unset transient-current-* --- lisp/transient.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/transient.el b/lisp/transient.el index a6e9ee8..0237bec 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2565,7 +2565,7 @@ value. Otherwise return CHILDREN as is." (oset (or transient--prefix transient-current-prefix) unwind-suffix (if transient--exitp - #'transient--post-exit + (lambda (command) (transient--post-exit command t)) #'transient--resume-override)) t))) @@ -2600,7 +2600,7 @@ value. Otherwise return CHILDREN as is." (setq transient-current-command nil) (setq transient-current-suffixes nil))) -(defun transient--post-exit (&optional command) +(defun transient--post-exit (&optional command unwind) (transient--debug 'post-exit) (unless (and (eq transient--exitp 'replace) (or transient--prefix @@ -2631,6 +2631,10 @@ value. Otherwise return CHILDREN as is." (setq transient--all-levels-p nil) (setq transient--minibuffer-depth 0) (run-hooks 'transient-exit-hook) + (when unwind + (setq transient-current-prefix nil) + (setq transient-current-command nil) + (setq transient-current-suffixes nil)) (when resume (transient--stack-pop))))