# HG changeset patch # User Andreas Schwab # Date 1230302601 0 # Node ID eca026eee0d77f37c83f33e345b7129972645769 # Parent 8233f3e2beb48ab19823885e1f49bc26607ab072 (map_keymap_char_table_item): Make a copy of KEY if it is a cons. diff -r 8233f3e2beb4 -r eca026eee0d7 src/ChangeLog --- a/src/ChangeLog Fri Dec 26 09:39:49 2008 +0000 +++ b/src/ChangeLog Fri Dec 26 14:43:21 2008 +0000 @@ -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 -r 8233f3e2beb4 -r eca026eee0d7 src/keymap.c --- a/src/keymap.c Fri Dec 26 09:39:49 2008 +0000 +++ b/src/keymap.c Fri Dec 26 14:43:21 2008 +0000 @@ -650,6 +650,10 @@ { 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); }