aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2016-10-26 15:29:02 -0400
committerStefan Monnier2016-10-26 15:29:02 -0400
commit9c1cb8d595c827031f55a7ef23d083d9ec4a028c (patch)
tree48a28a6c2da8a481307e285288fe9ba65fdce22d
parent9c247d200b2b06dbfee84d22a03d559df119a23e (diff)
downloademacs-9c1cb8d595c827031f55a7ef23d083d9ec4a028c.tar.gz
emacs-9c1cb8d595c827031f55a7ef23d083d9ec4a028c.zip
* lisp/subr.el (set-transient-map): Exit for unbound events (bug#24755).
-rw-r--r--lisp/subr.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 573f238f743..07909b894f5 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4507,8 +4507,10 @@ to deactivate this transient map, regardless of KEEP-PRED."
4507 ;; exit C-u. 4507 ;; exit C-u.
4508 t) 4508 t)
4509 ((eq t keep-pred) 4509 ((eq t keep-pred)
4510 (eq this-command 4510 (let ((mc (lookup-key map (this-command-keys-vector))))
4511 (lookup-key map (this-command-keys-vector)))) 4511 ;; If the key is unbound `this-command` is
4512 ;; nil and so is `mc`.
4513 (and mc (eq this-command mc))))
4512 (t (funcall keep-pred))) 4514 (t (funcall keep-pred)))
4513 (funcall exitfun))))) 4515 (funcall exitfun)))))
4514 (add-hook 'pre-command-hook clearfun) 4516 (add-hook 'pre-command-hook clearfun)