+2010-01-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * keyboard.c (read_char): Don't apply previous change when current
+ buffer is unchanged by command execution.
+
2010-01-12 Jan Djärv <jan.h.d@swipnet.se>
* keyboard.c (read_char): Return after executing from special map.
if (!NILP (tem))
{
+ struct buffer *prev_buffer = current_buffer;
#if 0 /* This shouldn't be necessary anymore. --lorentey */
int was_locked = single_kboard;
int count = SPECPDL_INDEX ();
unbind_to (count, Qnil);
#endif
- /* The command may have changed the keymaps. Pretend there is input
- in another keyboard and return. This will recalculate keymaps. */
- c = make_number (-2);
- goto exit;
+ if (current_buffer != prev_buffer)
+ {
+ /* The command may have changed the keymaps. Pretend there
+ is input in another keyboard and return. This will
+ recalculate keymaps. */
+ c = make_number (-2);
+ goto exit;
+ }
+ else
+ goto retry;
}
/* Handle things that only apply to characters. */