[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 28491e1f8e 321/366: Properly deal with stealt
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 28491e1f8e 321/366: Properly deal with stealth undefined command |
Date: |
Tue, 25 Jan 2022 18:54:51 -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 90a0562200 265/366: transient-highlight-higher-levels: New option, (continued)
- [elpa] externals/transient 90a0562200 265/366: transient-highlight-higher-levels: New option, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 769219b5f5 272/366: Enable section movement, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 626d105ecf 274/366: transient--read-number-N: Return empty string instead of nil, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 57942fe961 280/366: manual: No longer depend on the ox-extra package, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient badebdd1c1 288/366: Set local checkdoc-symbol-words, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 7976562a3c 291/366: Sharp-quote functions, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 74cba5a418 296/366: Release version 0.3.7, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient df1ba0f144 301/366: transient-show-help: Cosmetics, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ea5ac99ffc 303/366: transient-show-help: Support per-object help functions, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient f4790969fe 312/366: make: Add stats target, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 28491e1f8e 321/366: Properly deal with stealth undefined command,
Jonas Bernoulli <=
- [elpa] externals/transient 143a13938c 323/366: transient-infix-read: Always enable-recursive-minibuffers, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient f2e0dfcc4b 330/366: transient--get-predicate-for: Ignore error in transient--suffix-symbol, Jonas Bernoulli, 2022/01/25