aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-11-20 11:53:04 +0400
committerDmitry Antipov2012-11-20 11:53:04 +0400
commit952580c5fd273ff9d8f095ab8edb6b116d07eb56 (patch)
tree7981c880b3b7879e0e86939a4f32c019f07a3b75 /src
parent23ba2705e22b89154ef7cbb0595419732080b94c (diff)
downloademacs-952580c5fd273ff9d8f095ab8edb6b116d07eb56.tar.gz
emacs-952580c5fd273ff9d8f095ab8edb6b116d07eb56.zip
* xdisp.c (buffer_shared): Adjust comment.
(buffer_shared_and_changed): New function. (prepare_menu_bars, redisplay_internal): Use it to decide whether all windows or frames should be updated.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/xdisp.c23
2 files changed, 22 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9e83129e585..c749b12cae8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * xdisp.c (buffer_shared): Adjust comment.
4 (buffer_shared_and_changed): New function.
5 (prepare_menu_bars, redisplay_internal): Use it to
6 decide whether all windows or frames should be updated.
7
12012-11-20 Stefan Monnier <monnier@iro.umontreal.ca> 82012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 9
3 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove. 10 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
diff --git a/src/xdisp.c b/src/xdisp.c
index 27d9fff0b7d..618f4dfc585 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -515,9 +515,8 @@ Lisp_Object Qmenu_bar_update_hook;
515 515
516static int overlay_arrow_seen; 516static int overlay_arrow_seen;
517 517
518/* Number of windows showing the buffer of the selected window (or 518/* Number of windows showing the buffer of the selected
519 another buffer with the same base buffer). keyboard.c refers to 519 window (or another buffer with the same base buffer). */
520 this. */
521 520
522int buffer_shared; 521int buffer_shared;
523 522
@@ -10889,8 +10888,15 @@ echo_area_display (int update_frame_p)
10889 return window_height_changed_p; 10888 return window_height_changed_p;
10890} 10889}
10891 10890
10891/* True if the current buffer is shown in more than
10892 one window and was modified since last display. */
10893
10894static int
10895buffer_shared_and_changed (void)
10896{
10897 return (buffer_shared > 1 && UNCHANGED_MODIFIED < MODIFF);
10898}
10892 10899
10893
10894/*********************************************************************** 10900/***********************************************************************
10895 Mode Lines and Frame Titles 10901 Mode Lines and Frame Titles
10896 ***********************************************************************/ 10902 ***********************************************************************/
@@ -11196,7 +11202,7 @@ prepare_menu_bars (void)
11196 /* Update the menu bar item lists, if appropriate. This has to be 11202 /* Update the menu bar item lists, if appropriate. This has to be
11197 done before any actual redisplay or generation of display lines. */ 11203 done before any actual redisplay or generation of display lines. */
11198 all_windows = (update_mode_lines 11204 all_windows = (update_mode_lines
11199 || buffer_shared > 1 11205 || buffer_shared_and_changed ()
11200 || windows_or_buffers_changed); 11206 || windows_or_buffers_changed);
11201 if (all_windows) 11207 if (all_windows)
11202 { 11208 {
@@ -13116,7 +13122,7 @@ redisplay_internal (void)
13116 if ((SAVE_MODIFF < MODIFF) != w->last_had_star) 13122 if ((SAVE_MODIFF < MODIFF) != w->last_had_star)
13117 { 13123 {
13118 w->update_mode_line = 1; 13124 w->update_mode_line = 1;
13119 if (buffer_shared > 1) 13125 if (buffer_shared_and_changed ())
13120 update_mode_lines++; 13126 update_mode_lines++;
13121 } 13127 }
13122 13128
@@ -13141,7 +13147,8 @@ redisplay_internal (void)
13141 /* The variable buffer_shared is set in redisplay_window and 13147 /* The variable buffer_shared is set in redisplay_window and
13142 indicates that we redisplay a buffer in different windows. See 13148 indicates that we redisplay a buffer in different windows. See
13143 there. */ 13149 there. */
13144 consider_all_windows_p = (update_mode_lines || buffer_shared > 1 13150 consider_all_windows_p = (update_mode_lines
13151 || buffer_shared_and_changed ()
13145 || cursor_type_changed); 13152 || cursor_type_changed);
13146 13153
13147 /* If specs for an arrow have changed, do thorough redisplay 13154 /* If specs for an arrow have changed, do thorough redisplay
@@ -13433,7 +13440,7 @@ redisplay_internal (void)
13433 } 13440 }
13434 13441
13435 CHARPOS (this_line_start_pos) = 0; 13442 CHARPOS (this_line_start_pos) = 0;
13436 consider_all_windows_p |= buffer_shared > 1; 13443 consider_all_windows_p |= buffer_shared_and_changed ();
13437 ++clear_face_cache_count; 13444 ++clear_face_cache_count;
13438#ifdef HAVE_WINDOW_SYSTEM 13445#ifdef HAVE_WINDOW_SYSTEM
13439 ++clear_image_cache_count; 13446 ++clear_image_cache_count;