diff --git a/lisp/keymap.el b/lisp/keymap.el index 791221f2459..9643dce5f9c 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -95,7 +95,8 @@ keymap-local-set cases is shared with all other buffers in the same major mode." (declare (compiler-macro (lambda (form) (keymap--compile-check key) form))) (interactive "KSet key locally: \nCSet key %s locally to command: ") - (let ((map (current-local-map))) + (let ((map (current-local-map)) + (key (key-description key))) (unless map (use-local-map (setq map (make-sparse-keymap)))) (keymap-set map key command)))