aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-09-06 02:13:47 +0000
committerStefan Monnier2007-09-06 02:13:47 +0000
commit9859458022d0884ae31257aaff7f231d75b8ab8f (patch)
tree3671e98ee9d1f28dd18330deb39f66ac9496436e
parentfad930b66dfefc13e7e98e0a1b1da444a8e10197 (diff)
downloademacs-9859458022d0884ae31257aaff7f231d75b8ab8f.tar.gz
emacs-9859458022d0884ae31257aaff7f231d75b8ab8f.zip
(redisplay_internal): Make sure Elisp code always sees
consistent values of selected_frame and selected_window.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d5f43d3899c..e873cd12283 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12007-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * xdisp.c (redisplay_internal): Make sure Elisp code always sees
4 consistent values of selected_frame and selected_window.
5
12007-09-04 Jason Rumney <jasonr@gnu.org> 62007-09-04 Jason Rumney <jasonr@gnu.org>
2 7
3 * w32console.c (initialize_w32_display): Zero unused hooks. 8 * w32console.c (initialize_w32_display): Zero unused hooks.
diff --git a/src/xdisp.c b/src/xdisp.c
index d16e13ef722..618a53836a1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10847,6 +10847,7 @@ redisplay_internal (preserve_echo_area)
10847 int count, count1; 10847 int count, count1;
10848 struct frame *sf; 10848 struct frame *sf;
10849 int polling_stopped_here = 0; 10849 int polling_stopped_here = 0;
10850 Lisp_Object old_frame = selected_frame;
10850 10851
10851 /* Non-zero means redisplay has to consider all windows on all 10852 /* Non-zero means redisplay has to consider all windows on all
10852 frames. Zero means, only selected_window is considered. */ 10853 frames. Zero means, only selected_window is considered. */
@@ -10908,6 +10909,14 @@ redisplay_internal (preserve_echo_area)
10908 } 10909 }
10909 10910
10910 retry: 10911 retry:
10912 if (!EQ (old_frame, selected_frame)
10913 && FRAME_LIVE_P (XFRAME (old_frame)))
10914 /* When running redisplay, we play a bit fast-and-loose and allow e.g.
10915 selected_frame and selected_window to be temporarily out-of-sync so
10916 when we come back here via `goto retry', we need to resync because we
10917 may need to run Elisp code (via prepare_menu_bars). */
10918 select_frame_for_redisplay (old_frame);
10919
10911 pause = 0; 10920 pause = 0;
10912 reconsider_clip_changes (w, current_buffer); 10921 reconsider_clip_changes (w, current_buffer);
10913 last_escape_glyph_frame = NULL; 10922 last_escape_glyph_frame = NULL;