aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-13 04:00:04 +0000
committerRichard M. Stallman1993-07-13 04:00:04 +0000
commit626f67f354cb56ef2bd6702af7bddbaedb6600b4 (patch)
tree8854faaf91a7e2bd3c8752ebf89c8ad9c01a0dd2
parent76202b57ccc39a616ee4bf972c2c838b1897c4b5 (diff)
downloademacs-626f67f354cb56ef2bd6702af7bddbaedb6600b4.tar.gz
emacs-626f67f354cb56ef2bd6702af7bddbaedb6600b4.zip
(define-key-after): Error if KEY has two elements.
-rw-r--r--lisp/subr.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 76593de4870..6978038b179 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -186,9 +186,13 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP."
186This is like `define-key' except that the binding for KEY is placed 186This is like `define-key' except that the binding for KEY is placed
187just after the binding for the event AFTER, instead of at the beginning 187just after the binding for the event AFTER, instead of at the beginning
188of the map. 188of the map.
189The order matters when the keymap is used as a menu." 189The order matters when the keymap is used as a menu.
190KEY must contain just one event type--it must be a string or vector
191of length 1."
190 (or (keymapp keymap) 192 (or (keymapp keymap)
191 (signal 'wrong-type-argument (list 'keymapp keymap))) 193 (signal 'wrong-type-argument (list 'keymapp keymap)))
194 (if (> (length key) 0)
195 (error "multi-event key specified in `define-key-after'"))
192 (let ((tail keymap) done inserted 196 (let ((tail keymap) done inserted
193 (first (aref key 0))) 197 (first (aref key 0)))
194 (while (and (not done) tail) 198 (while (and (not done) tail)