summaryrefslogtreecommitdiff
path: root/lisp/transient.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-01-30 09:51:02 +0100
committerJonas Bernoulli <jonas@bernoul.li>2026-01-30 09:51:02 +0100
commit0bbd75bd8d435fca536274da3058420f4450c6d1 (patch)
tree079a9a00c4262eefbd8b894e3dd208bea5e528c3 /lisp/transient.el
parent7dde7af02e002e63f10cb2d7834c829b569799b6 (diff)
transient--do-push-button: Handle stub buttons
Group headings are buttons too now, and while pressing them might do something in the future, for now it is enough to silently do nothing, instead of signaling a type error.
Diffstat (limited to 'lisp/transient.el')
-rw-r--r--lisp/transient.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index d3e7631..2eaf9af 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3290,12 +3290,15 @@ If there is no parent prefix, then behave like `transient--do-exit'."
"Call the command represented by the activated button.
Use that command's pre-command to determine transient behavior."
(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))
+ (cond-let*
+ ([pos (if (mouse-event-p last-command-event)
+ (posn-point (event-start last-command-event))
+ (point))]
+ [cmd (get-text-property pos 'command)]
+ (setq this-command cmd)
+ (setq transient--current-suffix (get-text-property pos 'suffix))
+ (transient--call-pre-command))
+ (transient--stay))))
(defun transient--do-recurse ()
"Call the transient prefix command, preparing for return to outer transient.