From: Lars Ingebrigtsen Date: Sun, 1 May 2016 19:15:06 +0000 (+0200) Subject: Allow `global-set-key' to bind keys under the `M-o' map X-Git-Tag: emacs-26.0.90~2032 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5942c18e9a4f04996d80071b717049f55c1f69d8;p=emacs.git 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). --- diff --git a/lisp/subr.el b/lisp/subr.el index 5f8d830051c..afc86a77f8d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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))