1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

Allow global-set-key' to bind keys under the M-o' map

* lisp/subr.el (global-set-key): Allow binding keys under the
`M-o' map (bug#9730).
This commit is contained in:
Lars Ingebrigtsen 2016-05-01 21:15:06 +02:00
parent 3984fbbce9
commit 5942c18e9a

View File

@ -849,7 +849,12 @@ above 127 (such as ISO Latin-1) can be included if you use a vector.
Note that if KEY has a local binding in the current buffer,
that local binding will continue to shadow any global binding
that you make with this function."
(interactive "KSet key globally: \nCSet key %s to command: ")
(interactive
(let* ((menu-prompting nil)
(key (read-key-sequence "Set key globally: ")))
(list key
(read-command (format "Set key %s to command: "
(key-description key))))))
(or (vectorp key) (stringp key)
(signal 'wrong-type-argument (list 'arrayp key)))
(define-key (current-global-map) key command))