[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 0ed0094919 4/8: Ensure transient-current-* va
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 0ed0094919 4/8: Ensure transient-current-* variables are unset on every exit |
Date: |
Sat, 2 Nov 2024 09:09:38 -0400 (EDT) |
branch: externals/transient
commit 0ed009491910f5466ad7f95b4576e9dde7156f4e
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Ensure transient-current-* variables are unset on every exit
In the simple case, when `transient--post-command' determines that
the transient is being exited, it calls `transient--post-exit' to
unset internal state but takes care to unset `transient-current-*'
itself.
When the minibuffer is involved and for other recursive edits and
if an unexpected error occurs, it cannot take care of the latter.
In those cases we can do it in `transient--post-exit' instead, but
until now we didn't. Do so if COMMAND is non-nil, which in the
normal case it is not.
Closes #323.
---
CHANGELOG | 6 ++++++
lisp/transient.el | 8 ++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 4c23fbcf6a..454ac3699b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,12 @@
suffix command with the mouse, information about the command is now
shown in the echo area or using a tooltip. #282
+Bug fixes:
+
+- When the command that exits a transient uses the minibuffer,
+ ~transient-current-*~ variables were not immediately reset to
+ ~nil~. #323
+
* v0.7.7 2024-10-04
Bug fix:
diff --git a/lisp/transient.el b/lisp/transient.el
index a6e9ee8fd8..0575dc73be 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2457,7 +2457,7 @@ value. Otherwise return CHILDREN as is."
(funcall fn) ; Already unwind protected.
(cond ((memq this-command '(top-level abort-recursive-edit))
(setq transient--exitp t)
- (transient--post-exit)
+ (transient--post-exit this-command)
(transient--delete-window))
(transient--prefix
(transient--resume-override)))))
@@ -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 command
+ (setq transient-current-prefix nil)
+ (setq transient-current-command nil)
+ (setq transient-current-suffixes nil))
(when resume
(transient--stack-pop))))
@@ -2717,7 +2721,7 @@ exit."
(setq transient--stack nil)
(setq transient--exitp t)
(transient--pre-exit)
- (transient--post-exit)))
+ (transient--post-exit this-command)))
;;; Pre-Commands
- [elpa] externals/transient updated (fcc54cb5d1 -> d6b52b6eb7), Jonas Bernoulli, 2024/11/02
- [elpa] externals/transient dd91827b41 3/8: Update changelog, Jonas Bernoulli, 2024/11/02
- [elpa] externals/transient cb11650a60 2/8: Show information about the suffix at point in the echo area, Jonas Bernoulli, 2024/11/02
- [elpa] externals/transient 0ed0094919 4/8: Ensure transient-current-* variables are unset on every exit,
Jonas Bernoulli <=
- [elpa] externals/transient 1b7f9be7b9 6/8: transient-suffix-object: Drop faulty fallback behavior, Jonas Bernoulli, 2024/11/02
- [elpa] externals/transient d9ced840fa 5/8: transient--make-redisplay-map: Ensure unread-command-events is used, Jonas Bernoulli, 2024/11/02
- [elpa] externals/transient 03f9f314cd 7/8: Re-generate manual, Jonas Bernoulli, 2024/11/02
- [elpa] externals/transient d6b52b6eb7 8/8: Release version 0.7.8, Jonas Bernoulli, 2024/11/02
- [elpa] externals/transient 38f7f46826 1/8: transient-enable-popup-navigation: Update documentation, Jonas Bernoulli, 2024/11/02