changeset 43158:43607fa60102

(global-set-key, local-set-key): Accept a symbol for the KEY argument (like define-key).
author Kim F. Storm <storm@cua.dk>
date Wed, 06 Feb 2002 23:05:44 +0000
parents c72ba425c038
children c69608fb5b19
files lisp/subr.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Wed Feb 06 23:05:03 2002 +0000
+++ b/lisp/subr.el	Wed Feb 06 23:05:44 2002 +0000
@@ -1669,7 +1669,7 @@
 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 @@
   (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)))