aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-04-16 05:40:48 +0000
committerRichard M. Stallman1998-04-16 05:40:48 +0000
commitff663bbec9e2b4e0480e4d670c862fcfb9c3e594 (patch)
treec161c5b56cbc1880dd12c478d391e5f512a0a329
parentf0c030b36d55d0f954f4c2fd0f75d34a0aadfeff (diff)
downloademacs-ff663bbec9e2b4e0480e4d670c862fcfb9c3e594.tar.gz
emacs-ff663bbec9e2b4e0480e4d670c862fcfb9c3e594.zip
(local-set-key, global-set-key): Return what define-key returns.
-rw-r--r--lisp/subr.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 653ab63e015..c21b862333d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1133,8 +1133,7 @@ that you make with this function."
1133 (interactive "KSet key globally: \nCSet key %s to command: ") 1133 (interactive "KSet key globally: \nCSet key %s to command: ")
1134 (or (vectorp key) (stringp key) 1134 (or (vectorp key) (stringp key)
1135 (signal 'wrong-type-argument (list 'arrayp key))) 1135 (signal 'wrong-type-argument (list 'arrayp key)))
1136 (define-key (current-global-map) key command) 1136 (define-key (current-global-map) key command))
1137 nil)
1138 1137
1139(defun local-set-key (key command) 1138(defun local-set-key (key command)
1140 "Give KEY a local binding as COMMAND. 1139 "Give KEY a local binding as COMMAND.
@@ -1152,8 +1151,7 @@ which in most cases is shared with all other buffers in the same major mode."
1152 (use-local-map (setq map (make-sparse-keymap)))) 1151 (use-local-map (setq map (make-sparse-keymap))))
1153 (or (vectorp key) (stringp key) 1152 (or (vectorp key) (stringp key)
1154 (signal 'wrong-type-argument (list 'arrayp key))) 1153 (signal 'wrong-type-argument (list 'arrayp key)))
1155 (define-key map key command)) 1154 (define-key map key command)))
1156 nil)
1157 1155
1158(defun global-unset-key (key) 1156(defun global-unset-key (key)
1159 "Remove global binding of KEY. 1157 "Remove global binding of KEY.