branch: externals/transient
commit 0bbd75bd8d435fca536274da3058420f4450c6d1
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
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.
---
lisp/transient.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index d3e763158e..2eaf9afbdb 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.