aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2002-02-06 23:05:44 +0000
committerKim F. Storm2002-02-06 23:05:44 +0000
commit9c874d82af09ef421830089a5b1d9124277d384e (patch)
treecefa19bcd27e1b58450204c01002ee848f72901e
parentd2ab11c5a7f07613269d07e8054218b159256251 (diff)
downloademacs-9c874d82af09ef421830089a5b1d9124277d384e.tar.gz
emacs-9c874d82af09ef421830089a5b1d9124277d384e.zip
(global-set-key, local-set-key): Accept a symbol for the
KEY argument (like define-key).
-rw-r--r--lisp/subr.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 6c823cedf0e..c87bc90136c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1669,7 +1669,7 @@ Note that if KEY has a local binding in the current buffer,
1669that local binding will continue to shadow any global binding 1669that local binding will continue to shadow any global binding
1670that you make with this function." 1670that you make with this function."
1671 (interactive "KSet key globally: \nCSet key %s to command: ") 1671 (interactive "KSet key globally: \nCSet key %s to command: ")
1672 (or (vectorp key) (stringp key) 1672 (or (vectorp key) (stringp key) (symbolp key)
1673 (signal 'wrong-type-argument (list 'arrayp key))) 1673 (signal 'wrong-type-argument (list 'arrayp key)))
1674 (define-key (current-global-map) key command)) 1674 (define-key (current-global-map) key command))
1675 1675
@@ -1687,7 +1687,7 @@ which in most cases is shared with all other buffers in the same major mode."
1687 (let ((map (current-local-map))) 1687 (let ((map (current-local-map)))
1688 (or map 1688 (or map
1689 (use-local-map (setq map (make-sparse-keymap)))) 1689 (use-local-map (setq map (make-sparse-keymap))))
1690 (or (vectorp key) (stringp key) 1690 (or (vectorp key) (stringp key) (symbolp key)
1691 (signal 'wrong-type-argument (list 'arrayp key))) 1691 (signal 'wrong-type-argument (list 'arrayp key)))
1692 (define-key map key command))) 1692 (define-key map key command)))
1693 1693