Commit 9c1cb8d5 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/subr.el (set-transient-map): Exit for unbound events (bug#24755).

parent 9c247d20
......@@ -4507,8 +4507,10 @@ to deactivate this transient map, regardless of KEEP-PRED."
;; exit C-u.
((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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment