# HG changeset patch # User Kenichi Handa # Date 1069499041 0 # Node ID 99303f55a1b8f9a8f1572076684a7e9ce04ab2ef # Parent 6c59a027436ad9e30b3073f9736b4cebd30c7a5c (store_in_keymap): Pay attention to the case that idx is a cons specifying a character range. diff -r 6c59a027436a -r 99303f55a1b8 src/keymap.c --- a/src/keymap.c Sat Nov 22 07:46:40 2003 +0000 +++ b/src/keymap.c Sat Nov 22 11:04:01 2003 +0000 @@ -826,10 +826,15 @@ 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. */