[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 804feb3b41 361/366: transient--{push, pop}-ke
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 804feb3b41 361/366: transient--{push, pop}-keymap: Do nothing if keymap is void |
Date: |
Tue, 25 Jan 2022 18:54:55 -0500 (EST) |
branch: externals/transient
commit 804feb3b418809a831f8ac6d63233d19ef235a90
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--{push,pop}-keymap: Do nothing if keymap is void
Previously nil was pushed/popped using the low-level function, which
didn't have a noticeable effect but it is better to explicitly turn
these cases into noops.
---
lisp/transient.el | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 2e89fb19a0..e4c6a07228 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1634,15 +1634,19 @@ of the corresponding object.")
(defvar transient--redisplay-map nil)
(defvar transient--redisplay-key nil)
-(defun transient--push-keymap (map)
- (transient--debug " push %s%s" map (if (symbol-value map) "" " VOID"))
- (with-demoted-errors "transient--push-keymap: %S"
- (internal-push-keymap (symbol-value map) 'overriding-terminal-local-map)))
-
-(defun transient--pop-keymap (map)
- (transient--debug " pop %s%s" map (if (symbol-value map) "" " VOID"))
- (with-demoted-errors "transient--pop-keymap: %S"
- (internal-pop-keymap (symbol-value map) 'overriding-terminal-local-map)))
+(defun transient--push-keymap (var)
+ (let ((map (symbol-value var)))
+ (transient--debug " push %s%s" var (if map "" " VOID"))
+ (when map
+ (with-demoted-errors "transient--push-keymap: %S"
+ (internal-push-keymap map 'overriding-terminal-local-map)))))
+
+(defun transient--pop-keymap (var)
+ (let ((map (symbol-value var)))
+ (transient--debug " pop %s%s" var (if map "" " VOID"))
+ (when map
+ (with-demoted-errors "transient--pop-keymap: %S"
+ (internal-pop-keymap map 'overriding-terminal-local-map)))))
(defun transient--make-transient-map ()
(let ((map (make-sparse-keymap)))
- [elpa] externals/transient 7f5520b330 307/366: Add support for non-proportional text, (continued)
- [elpa] externals/transient 7f5520b330 307/366: Add support for non-proportional text, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 129c2b1685 315/366: make: Set more variables in default.mk, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient abbe17560c 318/366: manual: Move common settings to .orgconfig, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 51c50d8c82 319/366: manual: Use updated support for definition commands, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 2e33f96cf0 326/366: transient--post-command: Cosmetics, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 76b77e01ac 328/366: magit--{pre, post}-command: Add emergency exits, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 41521a5c93 331/366: transient--get-predicate-for: Always return a function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 69f42f9e89 334/366: transient--make-predicate-map: Cosmetics, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 8d8ed1965f 345/366: Hide infix commands from execute-extended-command, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 22e032ae65 343/366: Move obsolete variable declaration, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 804feb3b41 361/366: transient--{push, pop}-keymap: Do nothing if keymap is void,
Jonas Bernoulli <=
- [elpa] externals/transient 6d721f7490 348/366: Don't use convert-standard-filename when defining path variables, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 2c9cef1f5a 352/366: Bump copyright years, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 427e36046a 131/366: transient-force-fixed-pitch: New option, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 95389b31ec 137/366: transient-init-value: Always prefer saved over default value, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 700719723d 047/366: magit--history-push: Add optional SLOT argument, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 919fc6653d 048/366: transient--make-predicate-map: Always respect transient slot, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 93b5088ffd 050/366: Highlight the active infix while reading its value from the user, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 32459a4dde 074/366: Bring back arrow key navigation in transient popups, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 23fab3a114 075/366: Bring back mouse support in transient popups, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient b52c9652fa 077/366: Update manual, Jonas Bernoulli, 2022/01/25