diff src/keymap.c @ 100689:eca026eee0d7

(map_keymap_char_table_item): Make a copy of KEY if it is a cons.
author Andreas Schwab <schwab@suse.de>
date Fri, 26 Dec 2008 14:43:21 +0000
parents ec7ddeda2233
children e038c1a8307c
line wrap: on
line diff
--- 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);
     }