diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 57 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-12-20 Dmitry Antipov <dmantipov@yandex.ru> | 7 | 2012-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 c2789a78ef2..95c858218d4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12951,49 +12951,6 @@ reconsider_clip_changes (struct window *w, struct buffer *b) | |||
| 12951 | } | 12951 | } |
| 12952 | 12952 | ||
| 12953 | 12953 | ||
| 12954 | /* Select FRAME to forward the values of frame-local variables into C | ||
| 12955 | variables so that the redisplay routines can access those values | ||
| 12956 | directly. */ | ||
| 12957 | |||
| 12958 | static void | ||
| 12959 | select_frame_for_redisplay (Lisp_Object frame) | ||
| 12960 | { | ||
| 12961 | Lisp_Object tail, tem; | ||
| 12962 | Lisp_Object old = selected_frame; | ||
| 12963 | struct Lisp_Symbol *sym; | ||
| 12964 | |||
| 12965 | eassert (FRAMEP (frame) && FRAME_LIVE_P (XFRAME (frame))); | ||
| 12966 | |||
| 12967 | selected_frame = frame; | ||
| 12968 | /* If redisplay causes scrolling, it sets point in the window, so we need to | ||
| 12969 | be careful with the selected-window's point handling. */ | ||
| 12970 | select_window_1 (XFRAME (frame)->selected_window, 0); | ||
| 12971 | |||
| 12972 | do { | ||
| 12973 | for (tail = XFRAME (frame)->param_alist; | ||
| 12974 | CONSP (tail); tail = XCDR (tail)) | ||
| 12975 | if (CONSP (XCAR (tail)) | ||
| 12976 | && (tem = XCAR (XCAR (tail)), | ||
| 12977 | SYMBOLP (tem)) | ||
| 12978 | && (sym = indirect_variable (XSYMBOL (tem)), | ||
| 12979 | sym->redirect == SYMBOL_LOCALIZED) | ||
| 12980 | && sym->val.blv->frame_local) | ||
| 12981 | /* Use find_symbol_value rather than Fsymbol_value | ||
| 12982 | to avoid an error if it is void. */ | ||
| 12983 | find_symbol_value (tem); | ||
| 12984 | } while (!EQ (frame, old) && (frame = old, 1)); | ||
| 12985 | } | ||
| 12986 | |||
| 12987 | /* Make sure that previously selected OLD_FRAME is selected unless it has been | ||
| 12988 | deleted (by an X connection failure during redisplay, for example). */ | ||
| 12989 | |||
| 12990 | static void | ||
| 12991 | ensure_selected_frame (Lisp_Object frame) | ||
| 12992 | { | ||
| 12993 | if (!EQ (frame, selected_frame) && FRAME_LIVE_P (XFRAME (frame))) | ||
| 12994 | select_frame_for_redisplay (frame); | ||
| 12995 | } | ||
| 12996 | |||
| 12997 | #define STOP_POLLING \ | 12954 | #define STOP_POLLING \ |
| 12998 | do { if (! polling_stopped_here) stop_polling (); \ | 12955 | do { if (! polling_stopped_here) stop_polling (); \ |
| 12999 | polling_stopped_here = 1; } while (0) | 12956 | polling_stopped_here = 1; } while (0) |
| @@ -13078,12 +13035,6 @@ redisplay_internal (void) | |||
| 13078 | /* Remember the currently selected window. */ | 13035 | /* Remember the currently selected window. */ |
| 13079 | sw = w; | 13036 | sw = w; |
| 13080 | 13037 | ||
| 13081 | /* When running redisplay, we play a bit fast-and-loose and allow e.g. | ||
| 13082 | selected_frame and selected_window to be temporarily out-of-sync so | ||
| 13083 | when we come back here via `goto retry', we need to resync because we | ||
| 13084 | may need to run Elisp code (via prepare_menu_bars). */ | ||
| 13085 | ensure_selected_frame (old_frame); | ||
| 13086 | |||
| 13087 | pending = 0; | 13038 | pending = 0; |
| 13088 | reconsider_clip_changes (w, current_buffer); | 13039 | reconsider_clip_changes (w, current_buffer); |
| 13089 | last_escape_glyph_frame = NULL; | 13040 | last_escape_glyph_frame = NULL; |
| @@ -13491,9 +13442,6 @@ redisplay_internal (void) | |||
| 13491 | 13442 | ||
| 13492 | if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) | 13443 | if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) |
| 13493 | { | 13444 | { |
| 13494 | /* Select the frame, for the sake of frame-local variables. */ | ||
| 13495 | ensure_selected_frame (frame); | ||
| 13496 | |||
| 13497 | /* Mark all the scroll bars to be removed; we'll redeem | 13445 | /* Mark all the scroll bars to be removed; we'll redeem |
| 13498 | the ones we want when we redisplay their windows. */ | 13446 | the ones we want when we redisplay their windows. */ |
| 13499 | if (FRAME_TERMINAL (f)->condemn_scroll_bars_hook) | 13447 | if (FRAME_TERMINAL (f)->condemn_scroll_bars_hook) |
| @@ -13543,10 +13491,6 @@ redisplay_internal (void) | |||
| 13543 | } | 13491 | } |
| 13544 | } | 13492 | } |
| 13545 | 13493 | ||
| 13546 | /* We played a bit fast-and-loose above and allowed selected_frame | ||
| 13547 | and selected_window to be temporarily out-of-sync but let's make | ||
| 13548 | sure this stays contained. */ | ||
| 13549 | ensure_selected_frame (old_frame); | ||
| 13550 | eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window)); | 13494 | eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window)); |
| 13551 | 13495 | ||
| 13552 | if (!pending) | 13496 | if (!pending) |
| @@ -13772,7 +13716,6 @@ static Lisp_Object | |||
| 13772 | unwind_redisplay (Lisp_Object old_frame) | 13716 | unwind_redisplay (Lisp_Object old_frame) |
| 13773 | { | 13717 | { |
| 13774 | redisplaying_p = 0; | 13718 | redisplaying_p = 0; |
| 13775 | ensure_selected_frame (old_frame); | ||
| 13776 | return Qnil; | 13719 | return Qnil; |
| 13777 | } | 13720 | } |
| 13778 | 13721 | ||