branch: externals/transient commit 72d1f05cbd353fceff4eb028dff0eccc3584303a Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Revert "Deal with commands that use the minibuffer outside of interactive" This reverts commit 804c27f1f585c05a777c288fbcfa1c16a3c0cd45. Doing that fixes #229 but reintroduces #222. Unfortunately the window is quickly closing to settle on the implementation that will be included in Emacs 29.1. I am choosing the lesser evil here, but hope I can still finish an implementation that fixes both issues. --- lisp/transient.el | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lisp/transient.el b/lisp/transient.el index b1b8a90b8c..ab01332d90 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2211,7 +2211,7 @@ value. Otherwise return CHILDREN as is." (delayed (if transient--exitp (apply-partially #'transient--post-exit this-command) #'transient--resume-override)) - outside-interactive post-command abort-minibuffer) + post-command abort-minibuffer) (unless abort-only (setq post-command (lambda () "@transient--delay-post-command" @@ -2223,9 +2223,7 @@ value. Otherwise return CHILDREN as is." (equal (ignore-errors (string-to-multibyte (this-command-keys))) - (format "\M-x%s\r" this-command)) - ;; Minibuffer used outside `interactive'. - (and outside-interactive 'post-cmd))))) + (format "\M-x%s\r" this-command)))))) (transient--debug 'post-command-hook "act: %s" act) (when act (remove-hook 'transient--post-command-hook post-command) @@ -2234,15 +2232,12 @@ value. Otherwise return CHILDREN as is." (add-hook 'transient--post-command-hook post-command)) (setq abort-minibuffer (lambda () "@transient--delay-post-command" - (let ((act (and (= (minibuffer-depth) depth) - (or (memq this-command transient--abort-commands) - (equal (this-command-keys) "") - (prog1 nil - (setq outside-interactive t)))))) + (let ((act (and (or (memq this-command transient--abort-commands) + (equal (this-command-keys) "")) + (= (minibuffer-depth) depth)))) (transient--debug 'abort-minibuffer - "mini: %s|%s, act: %s" (minibuffer-depth) depth - (or act (and outside-interactive '->post-cmd))) + "mini: %s|%s, act %s" (minibuffer-depth) depth act) (when act (remove-hook 'transient--post-command-hook post-command) (remove-hook 'minibuffer-exit-hook abort-minibuffer)