emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 9c1cb8d: * lisp/subr.el (set-transient-map): Exit


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-25 9c1cb8d: * lisp/subr.el (set-transient-map): Exit for unbound events (bug#24755).
Date: Wed, 26 Oct 2016 19:29:05 +0000 (UTC)

branch: emacs-25
commit 9c1cb8d595c827031f55a7ef23d083d9ec4a028c
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/subr.el (set-transient-map): Exit for unbound events (bug#24755).
---
 lisp/subr.el |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index 573f238..07909b8 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4507,8 +4507,10 @@ to deactivate this transient map, regardless of 
KEEP-PRED."
                         ;; exit C-u.
                         t)
                        ((eq t keep-pred)
-                        (eq this-command
-                            (lookup-key map (this-command-keys-vector))))
+                        (let ((mc (lookup-key map (this-command-keys-vector))))
+                          ;; If the key is unbound `this-command` is
+                          ;; nil and so is `mc`.
+                          (and mc (eq this-command mc))))
                        (t (funcall keep-pred)))
                 (funcall exitfun)))))
     (add-hook 'pre-command-hook clearfun)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]