[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 28491e1f8e 02/38: Properly deal with stealth
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 28491e1f8e 02/38: Properly deal with stealth undefined command |
Date: |
Tue, 11 Jan 2022 05:37:44 -0500 (EST) |
branch: externals/transient
commit 28491e1f8e8d7548a1aa126618d15a35d7bbc57b
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Properly deal with stealth undefined command
If a valid but incomplete prefix sequence is followed by
an unbound key, then Emacs calls the `undefined' command
but does not set `this-command', `this-original-command'
or `real-this-command' accordingly. Instead they are nil.
Deal with this by adding a corresponding entry to
`transient-predicate-map', replacing the old kludge
we used when we didn't know what was going on yet.
---
lisp/transient.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 6897811b5a..1b27637b67 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1554,6 +1554,11 @@ to `transient-predicate-map'. Also see
`transient-base-map'.")
(define-key map [transient-forward-button] #'transient--do-move)
(define-key map [transient-isearch-backward] #'transient--do-move)
(define-key map [transient-isearch-forward] #'transient--do-move)
+ ;; If a valid but incomplete prefix sequence is followed by
+ ;; an unbound key, then Emacs calls the `undefined' command
+ ;; but does not set `this-command', `this-original-command'
+ ;; or `real-this-command' accordingly. Instead they are nil.
+ (define-key map [nil] #'transient--do-warn)
map)
"Base keymap used to map common commands to their transient behavior.
@@ -2029,11 +2034,6 @@ value. Otherwise return CHILDREN as is."
(defun transient--post-command ()
(transient--debug 'post-command)
- (unless this-command
- (transient--debug "-- force pre-exit from post-command")
- (message "Quit transient!")
- (transient--pre-exit)
- (setq transient--exitp t))
(if transient--exitp
(progn
(unless (and (eq transient--exitp 'replace)
- [elpa] externals/transient updated (51c50d8c82 -> 3de8d9b256), Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 338f7942a7 01/38: Various debug improvements, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 28491e1f8e 02/38: Properly deal with stealth undefined command,
Jonas Bernoulli <=
- [elpa] externals/transient 1a1ae03600 05/38: Remove transient--pre-command later, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 41521a5c93 12/38: transient--get-predicate-for: Always return a function, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 143a13938c 04/38: transient-infix-read: Always enable-recursive-minibuffers, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 69f42f9e89 15/38: transient--make-predicate-map: Cosmetics, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient e90f7a165e 16/38: Add support for returning from a sub-prefix to the parent prefix, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 714e348296 18/38: No longer always suspend when handle-switch-frame is called, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient c19ff84355 19/38: manual: Rearrange and group options, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 5762bd9a06 22/38: transient-hide-during-minibuffer-read: New option, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 8d8ed1965f 26/38: Hide infix commands from execute-extended-command, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 6103f168aa 28/38: transient--describe-function: Deal with anonymous infix arguments, Jonas Bernoulli, 2022/01/11