aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Bronson2014-05-06 12:16:57 -0400
committerStefan Monnier2014-05-06 12:16:57 -0400
commit8e102bcc97871ed6e0d2deba84fe46d9a78e9e44 (patch)
tree3634264eb0564610256f3e67848a6867d4c52d95 /src
parent863f07dea0ce02fd8263f5363c9d50504fc4af6e (diff)
downloademacs-8e102bcc97871ed6e0d2deba84fe46d9a78e9e44.tar.gz
emacs-8e102bcc97871ed6e0d2deba84fe46d9a78e9e44.zip
* src/keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
are matched. Fixes: debbugs:17413
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/keyboard.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 720ab11135f..c1d45f1df40 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-05-06 Samuel Bronson <naesten@gmail.com>
2
3 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
4 are matched (bug#17413).
5
12014-05-06 Jarek Czekalski <jarekczek@poczta.onet.pl> 62014-05-06 Jarek Czekalski <jarekczek@poczta.onet.pl>
2 7
3 Stop tooltips pulling Emacs window to front (Bug#17408). 8 Stop tooltips pulling Emacs window to front (Bug#17408).
diff --git a/src/keyboard.c b/src/keyboard.c
index 90479375072..8bc0c108739 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -825,22 +825,25 @@ This function is called by the editor initialization to begin editing. */)
825 if (input_blocked_p ()) 825 if (input_blocked_p ())
826 return Qnil; 826 return Qnil;
827 827
828 command_loop_level++; 828 if (command_loop_level >= 0
829 update_mode_lines = 17;
830
831 if (command_loop_level
832 && current_buffer != XBUFFER (XWINDOW (selected_window)->contents)) 829 && current_buffer != XBUFFER (XWINDOW (selected_window)->contents))
833 buffer = Fcurrent_buffer (); 830 buffer = Fcurrent_buffer ();
834 else 831 else
835 buffer = Qnil; 832 buffer = Qnil;
836 833
834 /* Don't do anything interesting between the increment and the
835 record_unwind_protect! Otherwise, we could get distracted and
836 never decrement the counter again. */
837 command_loop_level++;
838 update_mode_lines = 17;
839 record_unwind_protect (recursive_edit_unwind, buffer);
840
837 /* If we leave recursive_edit_1 below with a `throw' for instance, 841 /* If we leave recursive_edit_1 below with a `throw' for instance,
838 like it is done in the splash screen display, we have to 842 like it is done in the splash screen display, we have to
839 make sure that we restore single_kboard as command_loop_1 843 make sure that we restore single_kboard as command_loop_1
840 would have done if it were left normally. */ 844 would have done if it were left normally. */
841 if (command_loop_level > 0) 845 if (command_loop_level > 0)
842 temporarily_switch_to_single_kboard (SELECTED_FRAME ()); 846 temporarily_switch_to_single_kboard (SELECTED_FRAME ());
843 record_unwind_protect (recursive_edit_unwind, buffer);
844 847
845 recursive_edit_1 (); 848 recursive_edit_1 ();
846 return unbind_to (count, Qnil); 849 return unbind_to (count, Qnil);