emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117074: * src/keyboard.c (Frecursive_edit): Ensu


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117074: * src/keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
Date: Tue, 06 May 2014 16:17:05 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117074
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17413
author: Samuel Bronson <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-05-06 12:16:57 -0400
message:
  * src/keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
  are matched.
modified:
  lib-src/ChangeLog              changelog-20091113204419-o5vbwnq5f7feedwu-1608
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/keyboard.c                 keyboard.c-20091113204419-o5vbwnq5f7feedwu-449
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2014-05-03 20:13:10 +0000
+++ b/lib-src/ChangeLog 2014-05-06 16:16:57 +0000
@@ -688,7 +688,7 @@
        Use _Noreturn rather than NO_RETURN.
        No need for separate decl merely because of _Noreturn.
 
-2012-06-24  Samuel Bronson  <address@hidden>  (tiny change)
+2012-06-24  Samuel Bronson  <address@hidden>
 
        * emacsclient.c (set_local_socket): Fix compiler warning (Bug#7838).
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-05-06 16:00:30 +0000
+++ b/src/ChangeLog     2014-05-06 16:16:57 +0000
@@ -1,3 +1,8 @@
+2014-05-06  Samuel Bronson  <address@hidden>
+
+       * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
+       are matched (bug#17413).
+
 2014-05-06  Jarek Czekalski  <address@hidden>
 
        Stop tooltips pulling Emacs window to front (Bug#17408).

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2014-04-21 15:55:28 +0000
+++ b/src/keyboard.c    2014-05-06 16:16:57 +0000
@@ -825,22 +825,25 @@
   if (input_blocked_p ())
     return Qnil;
 
-  command_loop_level++;
-  update_mode_lines = 17;
-
-  if (command_loop_level
+  if (command_loop_level >= 0
       && current_buffer != XBUFFER (XWINDOW (selected_window)->contents))
     buffer = Fcurrent_buffer ();
   else
     buffer = Qnil;
 
+  /* Don't do anything interesting between the increment and the
+     record_unwind_protect!  Otherwise, we could get distracted and
+     never decrement the counter again.  */
+  command_loop_level++;
+  update_mode_lines = 17;
+  record_unwind_protect (recursive_edit_unwind, buffer);
+
   /* If we leave recursive_edit_1 below with a `throw' for instance,
      like it is done in the splash screen display, we have to
      make sure that we restore single_kboard as command_loop_1
      would have done if it were left normally.  */
   if (command_loop_level > 0)
     temporarily_switch_to_single_kboard (SELECTED_FRAME ());
-  record_unwind_protect (recursive_edit_unwind, buffer);
 
   recursive_edit_1 ();
   return unbind_to (count, Qnil);


reply via email to

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