changeset 4070:5a97f81baf65

(define-key-after): Error if KEY has two elements.
author Richard M. Stallman <rms@gnu.org>
date Tue, 13 Jul 1993 04:00:04 +0000
parents 643048c8e307
children 4f387cc0a49f
files lisp/subr.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Tue Jul 13 03:23:19 1993 +0000
+++ b/lisp/subr.el	Tue Jul 13 04:00:04 1993 +0000
@@ -186,9 +186,13 @@
 This is like `define-key' except that the binding for KEY is placed
 just after the binding for the event AFTER, instead of at the beginning
 of the map.
-The order matters when the keymap is used as a menu."
+The order matters when the keymap is used as a menu.
+KEY must contain just one event type--it must be a string or vector
+of length 1."
   (or (keymapp keymap)
       (signal 'wrong-type-argument (list 'keymapp keymap)))
+  (if (> (length key) 0)
+      (error "multi-event key specified in `define-key-after'"))
   (let ((tail keymap) done inserted
 	(first (aref key 0)))
     (while (and (not done) tail)