aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-09-09 18:16:48 +0000
committerChong Yidong2008-09-09 18:16:48 +0000
commitf1ba6ccdf54c37205c0e5e332c55a86b7a1f38c8 (patch)
treef43564808c8befc56410356a1ba8b0da266e94f9 /src
parentdaf85753e6067128db2369ffd97e2b25f9168d7c (diff)
downloademacs-f1ba6ccdf54c37205c0e5e332c55a86b7a1f38c8.tar.gz
emacs-f1ba6ccdf54c37205c0e5e332c55a86b7a1f38c8.zip
(read_key_sequence): Reapply translation maps when switching
keyboards.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 086ba110337..5015155d97f 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9154,16 +9154,10 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
9154 orig_keymap = get_local_map (PT, current_buffer, Qkeymap); 9154 orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
9155 from_string = Qnil; 9155 from_string = Qnil;
9156 9156
9157 /* The multi-tty merge moved the code below to right after 9157 /* We jump here when we need to reinitialize fkey and keytran; this
9158 `replay_sequence' which caused all these translation maps to be applied 9158 happens if we switch keyboards between rescans. */
9159 repeatedly, even tho their doc says very clearly they are not applied to 9159 replay_entire_sequence:
9160 their own output. 9160
9161 The reason for this move was: "We may switch keyboards between rescans,
9162 so we need to reinitialize fkey and keytran before each replay".
9163 This move was wrong (even if we switch keyboards, keybuf still holds the
9164 keys we've read already from the original keyboard and some of those keys
9165 may have already been translated). So there may still be a bug out there
9166 lurking. */
9167 indec.map = indec.parent = current_kboard->Vinput_decode_map; 9161 indec.map = indec.parent = current_kboard->Vinput_decode_map;
9168 fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map; 9162 fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map;
9169 keytran.map = keytran.parent = Vkey_translation_map; 9163 keytran.map = keytran.parent = Vkey_translation_map;
@@ -9360,7 +9354,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
9360 /* Don't touch interrupted_kboard when it's been 9354 /* Don't touch interrupted_kboard when it's been
9361 deleted. */ 9355 deleted. */
9362 delayed_switch_frame = Qnil; 9356 delayed_switch_frame = Qnil;
9363 goto replay_sequence; 9357 goto replay_entire_sequence;
9364 } 9358 }
9365 9359
9366 if (!NILP (delayed_switch_frame)) 9360 if (!NILP (delayed_switch_frame))
@@ -9392,7 +9386,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
9392 mock_input = 0; 9386 mock_input = 0;
9393 orig_local_map = get_local_map (PT, current_buffer, Qlocal_map); 9387 orig_local_map = get_local_map (PT, current_buffer, Qlocal_map);
9394 orig_keymap = get_local_map (PT, current_buffer, Qkeymap); 9388 orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
9395 goto replay_sequence; 9389 goto replay_entire_sequence;
9396 } 9390 }
9397 } 9391 }
9398 9392