]> git.eshelyaron.com Git - emacs.git/commitdiff
(global-set-key, local-set-key): Accept a symbol for the
authorKim F. Storm <storm@cua.dk>
Wed, 6 Feb 2002 23:05:44 +0000 (23:05 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 6 Feb 2002 23:05:44 +0000 (23:05 +0000)
KEY argument (like define-key).

lisp/subr.el

index 6c823cedf0e9c4a19c98dba710aeda4aca920008..c87bc90136c3782e303d9000a517176924f22a56 100644 (file)
@@ -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)))