diff options
| author | Stefan Monnier | 2007-10-18 22:07:34 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-10-18 22:07:34 +0000 |
| commit | 3278f20eee991e78086bb3b93391ccf68001f586 (patch) | |
| tree | 192001b7bbd740614dea566a876e52a3fc1bd459 /src | |
| parent | 658dcd4753808b503e9cd327db2033632cdd4f7c (diff) | |
| download | emacs-3278f20eee991e78086bb3b93391ccf68001f586.tar.gz emacs-3278f20eee991e78086bb3b93391ccf68001f586.zip | |
(read_key_sequence): Undo a change introduced by multi-tty
which caused key-translation-map to applied repeatedly (thus breaking
double-mode).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/keyboard.c | 22 |
2 files changed, 21 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dcd9f0955dd..c50b6286407 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-10-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * keyboard.c (read_key_sequence): Undo a change introduced by multi-tty | ||
| 4 | which caused key-translation-map to applied repeatedly (thus breaking | ||
| 5 | double-mode). | ||
| 6 | |||
| 1 | 2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * xselect.c (x_own_selection, x_handle_selection_clear) | 9 | * xselect.c (x_own_selection, x_handle_selection_clear) |
diff --git a/src/keyboard.c b/src/keyboard.c index fccf5c88eaa..ddb0b4407b7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -9185,13 +9185,16 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9185 | orig_keymap = get_local_map (PT, current_buffer, Qkeymap); | 9185 | orig_keymap = get_local_map (PT, current_buffer, Qkeymap); |
| 9186 | from_string = Qnil; | 9186 | from_string = Qnil; |
| 9187 | 9187 | ||
| 9188 | /* We jump here when the key sequence has been thoroughly changed, and | 9188 | /* The multi-tty merge moved the code below to right after |
| 9189 | we need to rescan it starting from the beginning. When we jump here, | 9189 | `replay_sequence' which caused alll these translation maps to be applied |
| 9190 | keybuf[0..mock_input] holds the sequence we should reread. */ | 9190 | repeatedly, even tho their doc says very clearly they are not applied to |
| 9191 | replay_sequence: | 9191 | their own output. |
| 9192 | 9192 | The reason for this move was: "We may switch keyboards between rescans, | |
| 9193 | /* We may switch keyboards between rescans, so we need to | 9193 | so we need to reinitialize fkey and keytran before each replay". |
| 9194 | reinitialize fkey and keytran before each replay. */ | 9194 | This move was wrong (even if we switch keyboards, keybuf still holds the |
| 9195 | keys we've read already from the original keyboard and some of those keys | ||
| 9196 | may have already been translated). So there may still be a bug out there | ||
| 9197 | lurking. */ | ||
| 9195 | indec.map = indec.parent = current_kboard->Vinput_decode_map; | 9198 | indec.map = indec.parent = current_kboard->Vinput_decode_map; |
| 9196 | fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map; | 9199 | fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map; |
| 9197 | keytran.map = keytran.parent = Vkey_translation_map; | 9200 | keytran.map = keytran.parent = Vkey_translation_map; |
| @@ -9199,6 +9202,11 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9199 | fkey.start = fkey.end = 0; | 9202 | fkey.start = fkey.end = 0; |
| 9200 | keytran.start = keytran.end = 0; | 9203 | keytran.start = keytran.end = 0; |
| 9201 | 9204 | ||
| 9205 | /* We jump here when the key sequence has been thoroughly changed, and | ||
| 9206 | we need to rescan it starting from the beginning. When we jump here, | ||
| 9207 | keybuf[0..mock_input] holds the sequence we should reread. */ | ||
| 9208 | replay_sequence: | ||
| 9209 | |||
| 9202 | starting_buffer = current_buffer; | 9210 | starting_buffer = current_buffer; |
| 9203 | first_unbound = bufsize + 1; | 9211 | first_unbound = bufsize + 1; |
| 9204 | 9212 | ||