diff options
| author | Kim F. Storm | 2002-02-06 23:05:44 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-02-06 23:05:44 +0000 |
| commit | 9c874d82af09ef421830089a5b1d9124277d384e (patch) | |
| tree | cefa19bcd27e1b58450204c01002ee848f72901e | |
| parent | d2ab11c5a7f07613269d07e8054218b159256251 (diff) | |
| download | emacs-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.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, | |||
| 1669 | that local binding will continue to shadow any global binding | 1669 | that local binding will continue to shadow any global binding |
| 1670 | that you make with this function." | 1670 | that 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 | ||