Commit 939f0e96 authored by Kenichi Handa's avatar Kenichi Handa

(store_in_keymap): Pay attention to the case that idx

is a cons specifying a character range.
parent e06d3480
......@@ -826,10 +826,15 @@ store_in_keymap (keymap, idx, def)
if (!CONSP (keymap) || !EQ (XCAR (keymap), Qkeymap))
error ("attempt to define a key in a non-keymap");
/* If idx is a list (some sort of mouse click, perhaps?),
the index we want to use is the car of the list, which
ought to be a symbol. */
idx = EVENT_HEAD (idx);
/* If idx is a cons, and the car part is a character, idx must be of
the form (FROM-CHAR . TO-CHAR). */
if (CONSP (idx) && CHARACTERP (XCAR (idx)))
CHECK_CHARACTER_CDR (idx);
else
/* If idx is a list (some sort of mouse click, perhaps?),
the index we want to use is the car of the list, which
ought to be a symbol. */
idx = EVENT_HEAD (idx);
/* If idx is a symbol, it might have modifiers, which need to
be put in the canonical order. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment