diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-07-13 04:00:04 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-07-13 04:00:04 +0000 |
commit | 456d1feef07590b70591c29e15f7a2ded3b91f64 (patch) | |
tree | 7f7599a105630b7b92f7232382c2d3e870820743 | |
parent | 0b7cdb51ac79bcee0db15d5c48d494c8243d5f19 (diff) | |
download | emacs-456d1feef07590b70591c29e15f7a2ded3b91f64.tar.gz |
(define-key-after): Error if KEY has two elements.
-rw-r--r-- | lisp/subr.el | 6 |
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." 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) |