diff options
author | Kim F. Storm <storm@cua.dk> | 2002-02-06 23:05:44 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2002-02-06 23:05:44 +0000 |
commit | 9c874d82af09ef421830089a5b1d9124277d384e (patch) | |
tree | cefa19bcd27e1b58450204c01002ee848f72901e /lisp | |
parent | d2ab11c5a7f07613269d07e8054218b159256251 (diff) | |
download | emacs-9c874d82af09ef421830089a5b1d9124277d384e.tar.gz |
(global-set-key, local-set-key): Accept a symbol for the
KEY argument (like define-key).
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/subr.el | 4 |
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, 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: ") - (or (vectorp key) (stringp key) + (or (vectorp key) (stringp key) (symbolp key) (signal 'wrong-type-argument (list 'arrayp key))) (define-key (current-global-map) key command)) @@ -1687,7 +1687,7 @@ which in most cases is shared with all other buffers in the same major mode." (let ((map (current-local-map))) (or map (use-local-map (setq map (make-sparse-keymap)))) - (or (vectorp key) (stringp key) + (or (vectorp key) (stringp key) (symbolp key) (signal 'wrong-type-argument (list 'arrayp key))) (define-key map key command))) |