[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 5942c18: Allow `global-set-key' to bind keys under
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 5942c18: Allow `global-set-key' to bind keys under the `M-o' map |
Date: |
Sun, 01 May 2016 19:15:31 +0000 |
branch: master
commit 5942c18e9a4f04996d80071b717049f55c1f69d8
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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).
---
lisp/subr.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 5f8d830..afc86a7 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 5942c18: Allow `global-set-key' to bind keys under the `M-o' map,
Lars Ingebrigtsen <=