(map_keymap_char_table_item): Make a copy of KEY if it is a

cons.
This commit is contained in:
Andreas Schwab 2008-12-26 14:43:21 +00:00
parent 54b3386843
commit d704470f14
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-12-26 Andreas Schwab <schwab@suse.de>
* keymap.c (map_keymap_char_table_item): Make a copy of KEY if it is a
cons.
2008-12-26 Martin Rudalics <rudalics@gmx.at> 2008-12-26 Martin Rudalics <rudalics@gmx.at>
* textprop.c (Qminibuffer_prompt): New variable. * textprop.c (Qminibuffer_prompt): New variable.

View file

@ -650,6 +650,10 @@ map_keymap_char_table_item (args, key, val)
{ {
map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer; map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer;
args = XCDR (args); 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, map_keymap_item (fun, XCDR (args), key, val,
XSAVE_VALUE (XCAR (args))->pointer); XSAVE_VALUE (XCAR (args))->pointer);
} }