emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99306: * keyboard.c (read_char): Don


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99306: * keyboard.c (read_char): Don't apply previous change when current
Date: Tue, 12 Jan 2010 19:10:51 +0900
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99306
committer: YAMAMOTO Mitsuharu <address@hidden>
branch nick: trunk
timestamp: Tue 2010-01-12 19:10:51 +0900
message:
  * keyboard.c (read_char): Don't apply previous change when current
  buffer is unchanged by command execution.
modified:
  src/ChangeLog
  src/keyboard.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-01-12 08:12:52 +0000
+++ b/src/ChangeLog     2010-01-12 10:10:51 +0000
@@ -1,3 +1,8 @@
+2010-01-12  YAMAMOTO Mitsuharu  <address@hidden>
+
+       * keyboard.c (read_char): Don't apply previous change when current
+       buffer is unchanged by command execution.
+
 2010-01-12  Jan Djärv  <address@hidden>
 
        * keyboard.c (read_char): Return after executing from special map.

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2010-01-12 08:12:52 +0000
+++ b/src/keyboard.c    2010-01-12 10:10:51 +0000
@@ -3155,6 +3155,7 @@
 
   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 ();
@@ -3178,10 +3179,16 @@
       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.  */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]