Mercurial > emacs
diff src/keymap.c @ 89640:99303f55a1b8
(store_in_keymap): Pay attention to the case that idx
is a cons specifying a character range.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Sat, 22 Nov 2003 11:04:01 +0000 |
| parents | e2d5f38e23b4 |
| children | c7f2621e0e2d |
line wrap: on
line diff
--- 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. */
