From: Andreas Schwab Date: Fri, 26 Dec 2008 14:43:21 +0000 (+0000) Subject: (map_keymap_char_table_item): Make a copy of KEY if it is a X-Git-Tag: emacs-pretest-23.0.90~868 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d704470f14a59d218aaf843f01ce4e0b1af4ea82;p=emacs.git (map_keymap_char_table_item): Make a copy of KEY if it is a cons. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4d4a7a51b20..804e703eadd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-12-26 Andreas Schwab + + * keymap.c (map_keymap_char_table_item): Make a copy of KEY if it is a + cons. + 2008-12-26 Martin Rudalics * textprop.c (Qminibuffer_prompt): New variable. diff --git a/src/keymap.c b/src/keymap.c index 753d1991a3e..81ef32ed939 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -650,6 +650,10 @@ map_keymap_char_table_item (args, key, val) { map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer; args = XCDR (args); + /* If the key is a range, make a copy since map_char_table modifies + it in place. */ + if (CONSP (key)) + key = Fcons (XCAR (key), XCDR (key)); map_keymap_item (fun, XCDR (args), key, val, XSAVE_VALUE (XCAR (args))->pointer); }