summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-01-30 09:51:00 +0100
committerJonas Bernoulli <jonas@bernoul.li>2026-01-30 09:51:00 +0100
commit7dde7af02e002e63f10cb2d7834c829b569799b6 (patch)
tree3696961942536524c3f5d021fd93310d307c30c3
parent0d56235033e87370b0ef4d3bff09edf076edab1a (diff)
transient--do-push-button: Remove dead code
This pre-command is only used for `transient-push-button', which is only used inside the transient buffer/window.
-rw-r--r--lisp/transient.el18
1 files changed, 7 insertions, 11 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index 19b1622..d3e7631 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3289,17 +3289,13 @@ If there is no parent prefix, then behave like `transient--do-exit'."
(defun transient--do-push-button ()
"Call the command represented by the activated button.
Use that command's pre-command to determine transient behavior."
- (if (and (mouse-event-p last-command-event)
- (not (eq (posn-window (event-start last-command-event))
- transient--window)))
- transient--stay
- (with-selected-window transient--window
- (let ((pos (if (mouse-event-p last-command-event)
- (posn-point (event-start last-command-event))
- (point))))
- (setq this-command (get-text-property pos 'command))
- (setq transient--current-suffix (get-text-property pos 'suffix))))
- (transient--call-pre-command)))
+ (with-selected-window transient--window
+ (let ((pos (if (mouse-event-p last-command-event)
+ (posn-point (event-start last-command-event))
+ (point))))
+ (setq this-command (get-text-property pos 'command))
+ (setq transient--current-suffix (get-text-property pos 'suffix))))
+ (transient--call-pre-command))
(defun transient--do-recurse ()
"Call the transient prefix command, preparing for return to outer transient.