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)
POSITION should be a list of the form
(WINDOW BUFFER-POSITION (COL . ROW) TIMESTAMP)
as returned by the `event-start' and `event-end' functions."
- (nth 1 position))
+ (if (consp (nth 1 position))
+ (car (nth 1 position))
+ (nth 1 position)))
(defsubst posn-col-row (position)
"Return the row and column in POSITION.