aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2012-12-20 15:12:08 +0100
committerJoakim Verona2012-12-20 15:12:08 +0100
commit93a35bae36f6f77f90d900f4f07f0662a4c6c50f (patch)
treeed5a7608ec7b4633411ee984e405184d3645a684 /src
parent396061b73767cefb250a838f509e3427c1ebe296 (diff)
parente02230bf34f6ab62c5a13cff796cd75b2b348412 (diff)
downloademacs-93a35bae36f6f77f90d900f4f07f0662a4c6c50f.tar.gz
emacs-93a35bae36f6f77f90d900f4f07f0662a4c6c50f.zip
auto upstream
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c57
2 files changed, 6 insertions, 57 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e31e35c7b49..eea7d172804 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
4 (redisplay_internal): Don't bother selecting the frame to get the
5 proper value of frame-local variables.
6
12012-12-20 Dmitry Antipov <dmantipov@yandex.ru> 72012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
2 8
3 * textprop.c (set_text_properties_1): Do not allow NULL interval. 9 * textprop.c (set_text_properties_1): Do not allow NULL interval.
diff --git a/src/xdisp.c b/src/xdisp.c
index b9db0c3e80d..ea27be2eb8e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13005,49 +13005,6 @@ reconsider_clip_changes (struct window *w, struct buffer *b)
13005} 13005}
13006 13006
13007 13007
13008/* Select FRAME to forward the values of frame-local variables into C
13009 variables so that the redisplay routines can access those values
13010 directly. */
13011
13012static void
13013select_frame_for_redisplay (Lisp_Object frame)
13014{
13015 Lisp_Object tail, tem;
13016 Lisp_Object old = selected_frame;
13017 struct Lisp_Symbol *sym;
13018
13019 eassert (FRAMEP (frame) && FRAME_LIVE_P (XFRAME (frame)));
13020
13021 selected_frame = frame;
13022 /* If redisplay causes scrolling, it sets point in the window, so we need to
13023 be careful with the selected-window's point handling. */
13024 select_window_1 (XFRAME (frame)->selected_window, 0);
13025
13026 do {
13027 for (tail = XFRAME (frame)->param_alist;
13028 CONSP (tail); tail = XCDR (tail))
13029 if (CONSP (XCAR (tail))
13030 && (tem = XCAR (XCAR (tail)),
13031 SYMBOLP (tem))
13032 && (sym = indirect_variable (XSYMBOL (tem)),
13033 sym->redirect == SYMBOL_LOCALIZED)
13034 && sym->val.blv->frame_local)
13035 /* Use find_symbol_value rather than Fsymbol_value
13036 to avoid an error if it is void. */
13037 find_symbol_value (tem);
13038 } while (!EQ (frame, old) && (frame = old, 1));
13039}
13040
13041/* Make sure that previously selected OLD_FRAME is selected unless it has been
13042 deleted (by an X connection failure during redisplay, for example). */
13043
13044static void
13045ensure_selected_frame (Lisp_Object frame)
13046{
13047 if (!EQ (frame, selected_frame) && FRAME_LIVE_P (XFRAME (frame)))
13048 select_frame_for_redisplay (frame);
13049}
13050
13051#define STOP_POLLING \ 13008#define STOP_POLLING \
13052do { if (! polling_stopped_here) stop_polling (); \ 13009do { if (! polling_stopped_here) stop_polling (); \
13053 polling_stopped_here = 1; } while (0) 13010 polling_stopped_here = 1; } while (0)
@@ -13132,12 +13089,6 @@ redisplay_internal (void)
13132 /* Remember the currently selected window. */ 13089 /* Remember the currently selected window. */
13133 sw = w; 13090 sw = w;
13134 13091
13135 /* When running redisplay, we play a bit fast-and-loose and allow e.g.
13136 selected_frame and selected_window to be temporarily out-of-sync so
13137 when we come back here via `goto retry', we need to resync because we
13138 may need to run Elisp code (via prepare_menu_bars). */
13139 ensure_selected_frame (old_frame);
13140
13141 pending = 0; 13092 pending = 0;
13142 reconsider_clip_changes (w, current_buffer); 13093 reconsider_clip_changes (w, current_buffer);
13143 last_escape_glyph_frame = NULL; 13094 last_escape_glyph_frame = NULL;
@@ -13552,9 +13503,6 @@ redisplay_internal (void)
13552 13503
13553 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) 13504 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
13554 { 13505 {
13555 /* Select the frame, for the sake of frame-local variables. */
13556 ensure_selected_frame (frame);
13557
13558 /* Mark all the scroll bars to be removed; we'll redeem 13506 /* Mark all the scroll bars to be removed; we'll redeem
13559 the ones we want when we redisplay their windows. */ 13507 the ones we want when we redisplay their windows. */
13560 if (FRAME_TERMINAL (f)->condemn_scroll_bars_hook) 13508 if (FRAME_TERMINAL (f)->condemn_scroll_bars_hook)
@@ -13604,10 +13552,6 @@ redisplay_internal (void)
13604 } 13552 }
13605 } 13553 }
13606 13554
13607 /* We played a bit fast-and-loose above and allowed selected_frame
13608 and selected_window to be temporarily out-of-sync but let's make
13609 sure this stays contained. */
13610 ensure_selected_frame (old_frame);
13611 eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window)); 13555 eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window));
13612 13556
13613 if (!pending) 13557 if (!pending)
@@ -13833,7 +13777,6 @@ static Lisp_Object
13833unwind_redisplay (Lisp_Object old_frame) 13777unwind_redisplay (Lisp_Object old_frame)
13834{ 13778{
13835 redisplaying_p = 0; 13779 redisplaying_p = 0;
13836 ensure_selected_frame (old_frame);
13837 return Qnil; 13780 return Qnil;
13838} 13781}
13839 13782