diff options
| author | YAMAMOTO Mitsuharu | 2010-01-12 19:10:51 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2010-01-12 19:10:51 +0900 |
| commit | 4a00eacab800ebf14e85af2a0251f14d49a90981 (patch) | |
| tree | cbeae7d72b29f8e6f1eb847d672aca4bde3372a6 /src | |
| parent | 60abb2870ba8d0314cde544d62dbb24aa53b8074 (diff) | |
| download | emacs-4a00eacab800ebf14e85af2a0251f14d49a90981.tar.gz emacs-4a00eacab800ebf14e85af2a0251f14d49a90981.zip | |
* keyboard.c (read_char): Don't apply previous change when current
buffer is unchanged by command execution.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f52cf8fee63..e5bdc50f1c7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * keyboard.c (read_char): Don't apply previous change when current | ||
| 4 | buffer is unchanged by command execution. | ||
| 5 | |||
| 1 | 2010-01-12 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2010-01-12 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * keyboard.c (read_char): Return after executing from special map. | 8 | * keyboard.c (read_char): Return after executing from special map. |
diff --git a/src/keyboard.c b/src/keyboard.c index 8bd8cf30468..3b57c6e470f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3155,6 +3155,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 3155 | 3155 | ||
| 3156 | if (!NILP (tem)) | 3156 | if (!NILP (tem)) |
| 3157 | { | 3157 | { |
| 3158 | struct buffer *prev_buffer = current_buffer; | ||
| 3158 | #if 0 /* This shouldn't be necessary anymore. --lorentey */ | 3159 | #if 0 /* This shouldn't be necessary anymore. --lorentey */ |
| 3159 | int was_locked = single_kboard; | 3160 | int was_locked = single_kboard; |
| 3160 | int count = SPECPDL_INDEX (); | 3161 | int count = SPECPDL_INDEX (); |
| @@ -3178,10 +3179,16 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 3178 | unbind_to (count, Qnil); | 3179 | unbind_to (count, Qnil); |
| 3179 | #endif | 3180 | #endif |
| 3180 | 3181 | ||
| 3181 | /* The command may have changed the keymaps. Pretend there is input | 3182 | if (current_buffer != prev_buffer) |
| 3182 | in another keyboard and return. This will recalculate keymaps. */ | 3183 | { |
| 3183 | c = make_number (-2); | 3184 | /* The command may have changed the keymaps. Pretend there |
| 3184 | goto exit; | 3185 | is input in another keyboard and return. This will |
| 3186 | recalculate keymaps. */ | ||
| 3187 | c = make_number (-2); | ||
| 3188 | goto exit; | ||
| 3189 | } | ||
| 3190 | else | ||
| 3191 | goto retry; | ||
| 3185 | } | 3192 | } |
| 3186 | 3193 | ||
| 3187 | /* Handle things that only apply to characters. */ | 3194 | /* Handle things that only apply to characters. */ |