diff options
| author | Andreas Schwab | 2008-12-26 14:43:21 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2008-12-26 14:43:21 +0000 |
| commit | d704470f14a59d218aaf843f01ce4e0b1af4ea82 (patch) | |
| tree | 97df951de64a36013b780861d286e47e02b6be4f /src/keymap.c | |
| parent | 54b33868432b9727a27ce9fe4698ace9da120631 (diff) | |
| download | emacs-d704470f14a59d218aaf843f01ce4e0b1af4ea82.tar.gz emacs-d704470f14a59d218aaf843f01ce4e0b1af4ea82.zip | |
(map_keymap_char_table_item): Make a copy of KEY if it is a
cons.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
| 650 | { | 650 | { |
| 651 | map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer; | 651 | map_keymap_function_t fun = XSAVE_VALUE (XCAR (args))->pointer; |
| 652 | args = XCDR (args); | 652 | args = XCDR (args); |
| 653 | /* If the key is a range, make a copy since map_char_table modifies | ||
| 654 | it in place. */ | ||
| 655 | if (CONSP (key)) | ||
| 656 | key = Fcons (XCAR (key), XCDR (key)); | ||
| 653 | map_keymap_item (fun, XCDR (args), key, val, | 657 | map_keymap_item (fun, XCDR (args), key, val, |
| 654 | XSAVE_VALUE (XCAR (args))->pointer); | 658 | XSAVE_VALUE (XCAR (args))->pointer); |
| 655 | } | 659 | } |