aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2003-11-22 11:04:01 +0000
committerKenichi Handa2003-11-22 11:04:01 +0000
commit939f0e96e7826e518a1b304b7b6a365bd82cdda3 (patch)
tree8ea608609bc7e0af590e33306d6cafd8687faea9 /src
parente06d3480d2474854bf1e9ce4c7b834af4edcb638 (diff)
downloademacs-939f0e96e7826e518a1b304b7b6a365bd82cdda3.tar.gz
emacs-939f0e96e7826e518a1b304b7b6a365bd82cdda3.zip
(store_in_keymap): Pay attention to the case that idx
is a cons specifying a character range.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/keymap.c b/src/keymap.c
index dd5bea45f59..e3d866f4756 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -826,10 +826,15 @@ store_in_keymap (keymap, idx, def)
826 if (!CONSP (keymap) || !EQ (XCAR (keymap), Qkeymap)) 826 if (!CONSP (keymap) || !EQ (XCAR (keymap), Qkeymap))
827 error ("attempt to define a key in a non-keymap"); 827 error ("attempt to define a key in a non-keymap");
828 828
829 /* If idx is a list (some sort of mouse click, perhaps?), 829 /* If idx is a cons, and the car part is a character, idx must be of
830 the index we want to use is the car of the list, which 830 the form (FROM-CHAR . TO-CHAR). */
831 ought to be a symbol. */ 831 if (CONSP (idx) && CHARACTERP (XCAR (idx)))
832 idx = EVENT_HEAD (idx); 832 CHECK_CHARACTER_CDR (idx);
833 else
834 /* If idx is a list (some sort of mouse click, perhaps?),
835 the index we want to use is the car of the list, which
836 ought to be a symbol. */
837 idx = EVENT_HEAD (idx);
833 838
834 /* If idx is a symbol, it might have modifiers, which need to 839 /* If idx is a symbol, it might have modifiers, which need to
835 be put in the canonical order. */ 840 be put in the canonical order. */