From 626f67f354cb56ef2bd6702af7bddbaedb6600b4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 13 Jul 1993 04:00:04 +0000 Subject: [PATCH] (define-key-after): Error if KEY has two elements. --- lisp/subr.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 76593de487..6978038b17 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." 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) -- 2.20.1