From 9c874d82af09ef421830089a5b1d9124277d384e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 6 Feb 2002 23:05:44 +0000 Subject: [PATCH] (global-set-key, local-set-key): Accept a symbol for the KEY argument (like define-key). --- lisp/subr.el | 4 ++-- 1 file 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))) -- 2.39.5