[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 79c999d263 325/366: transient--post-exit: New
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 79c999d263 325/366: transient--post-exit: New function |
Date: |
Tue, 25 Jan 2022 18:54:51 -0500 (EST) |
branch: externals/transient
commit 79c999d26351855ece63b2a393ed3271ef6a4ed5
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--post-exit: New function
---
lisp/transient.el | 49 ++++++++++++++++++++++++++-----------------------
1 file changed, 26 insertions(+), 23 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 1d2030cbaa..60ba611808 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2034,34 +2034,37 @@ value. Otherwise return CHILDREN as is."
(defun transient--post-command ()
(transient--debug 'post-command)
(if transient--exitp
- (progn
- (unless (and (eq transient--exitp 'replace)
- (or transient--prefix
- ;; The current command could act as a prefix,
- ;; but decided not to call `transient-setup'.
- (prog1 nil (transient--stack-zap))))
- (remove-hook 'pre-command-hook #'transient--pre-command)
- (remove-hook 'minibuffer-setup-hook #'transient--minibuffer-setup)
- (remove-hook 'minibuffer-exit-hook #'transient--minibuffer-exit)
- (advice-remove 'abort-recursive-edit #'transient--minibuffer-exit)
- (remove-hook 'post-command-hook #'transient--post-command))
- (setq transient-current-prefix nil)
- (setq transient-current-command nil)
- (setq transient-current-suffixes nil)
- (let ((resume (and transient--stack
- (not (memq transient--exitp '(replace suspend))))))
- (setq transient--exitp nil)
- (setq transient--helpp nil)
- (setq transient--editp nil)
- (run-hooks 'transient-exit-hook)
- (when resume
- (transient--stack-pop))))
+ (transient--post-exit)
(unless (eq this-command (oref transient--prefix command))
(transient--pop-keymap 'transient--redisplay-map)
(setq transient--redisplay-map (transient--make-redisplay-map))
(transient--push-keymap 'transient--redisplay-map)
(transient--redisplay))))
+(defun transient--post-exit ()
+ (transient--debug 'post-exit)
+ (unless (and (eq transient--exitp 'replace)
+ (or transient--prefix
+ ;; The current command could act as a prefix,
+ ;; but decided not to call `transient-setup'.
+ (prog1 nil (transient--stack-zap))))
+ (remove-hook 'pre-command-hook #'transient--pre-command)
+ (remove-hook 'minibuffer-setup-hook #'transient--minibuffer-setup)
+ (remove-hook 'minibuffer-exit-hook #'transient--minibuffer-exit)
+ (advice-remove 'abort-recursive-edit #'transient--minibuffer-exit)
+ (remove-hook 'post-command-hook #'transient--post-command))
+ (setq transient-current-prefix nil)
+ (setq transient-current-command nil)
+ (setq transient-current-suffixes nil)
+ (let ((resume (and transient--stack
+ (not (memq transient--exitp '(replace suspend))))))
+ (setq transient--exitp nil)
+ (setq transient--helpp nil)
+ (setq transient--editp nil)
+ (run-hooks 'transient-exit-hook)
+ (when resume
+ (transient--stack-pop))))
+
(defun transient--stack-push ()
(transient--debug 'stack-push)
(push (list (oref transient--prefix command)
@@ -2130,7 +2133,7 @@ nil) then do nothing."
(setq transient--stack nil)
(setq transient--exitp t)
(transient--pre-exit)
- (transient--post-command)))
+ (transient--post-exit)))
;;; Pre-Commands
- [elpa] externals/transient ee8bdcfcee 290/366: Fix alias definition, (continued)
- [elpa] externals/transient ee8bdcfcee 290/366: Fix alias definition, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 6842305e84 286/366: Support undefined suffixes if an extra step is taken, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 0c2255a296 295/366: transient-get-value: Add an emergency exit, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 938b059192 297/366: transient--show: Set point after displaying window again, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 9b6a251f5c 300/366: transient-show-help: Avoid this-original-command, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 667488ebff 305/366: Extend multi-value support, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 202271f755 306/366: Resurrect transient-files class, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 4e8aa09b3f 309/366: transient-define-infix: Fix documentation, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient c26cbac574 316/366: transient-{init, set}-value: Use case-sensitive matching, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 338f7942a7 320/366: Various debug improvements, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 79c999d263 325/366: transient--post-exit: New function,
Jonas Bernoulli <=
- [elpa] externals/transient e77d16dd02 322/366: transient--post-command: Avoid needlessly recreating redisplay map, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 7b8a7d718a 327/366: Use a more targeted approach to suspending transient override, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 3c78b10f52 333/366: transient--redisplay: Don't redisplay during mouse-drag-region, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient bf29731a72 332/366: transient--post-command: Don't pop and push equal redisplay maps, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 777a84d26b 339/366: manual: Document all options, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient c19ff84355 338/366: manual: Rearrange and group options, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 9412f26175 356/366: manual: Use more @itemx, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 3de8d9b256 357/366: manual: Fix list item, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ecb815bcae 353/366: transient--abort-commands: Add keyboard-escape-quit, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 686b7ebc5f 363/366: Fix handling of sub-prefix command that use the minibuffer, Jonas Bernoulli, 2022/01/25