aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-01-22 15:41:21 +0400
committerDmitry Antipov2013-01-22 15:41:21 +0400
commit1dcb8ea26301d187273787450fda118f5fc3c1a6 (patch)
tree038efe92f3d1b5f53c4ab10c470d7bfd177310e7 /src
parent19b50424a7e6801a8f96dbab422f70ade95b5825 (diff)
downloademacs-1dcb8ea26301d187273787450fda118f5fc3c1a6.tar.gz
emacs-1dcb8ea26301d187273787450fda118f5fc3c1a6.zip
* xdisp.c (mark_window_display_accurate): Simplify the loop
assuming that the only one of vchild, hchild or buffer window slots is non-nil. Call mark_window_display_accurate_1 for the leaf windows only. (mark_window_display_accurate_1): Always assume leaf window. Adjust comment.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/xdisp.c77
2 files changed, 42 insertions, 44 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a06f9e2fcd5..ec7f8f068bd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * xdisp.c (mark_window_display_accurate): Simplify the loop
4 assuming that the only one of vchild, hchild or buffer window
5 slots is non-nil. Call mark_window_display_accurate_1 for
6 the leaf windows only.
7 (mark_window_display_accurate_1): Always assume leaf window.
8 Adjust comment.
9
12013-01-22 Paul Eggert <eggert@cs.ucla.edu> 102013-01-22 Paul Eggert <eggert@cs.ucla.edu>
2 11
3 * emacs.c (Qkill_emacs_hook): Now static. 12 * emacs.c (Qkill_emacs_hook): Now static.
diff --git a/src/xdisp.c b/src/xdisp.c
index b75362b1446..69a8a02b2cb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13722,49 +13722,42 @@ unwind_redisplay (Lisp_Object old_frame)
13722} 13722}
13723 13723
13724 13724
13725/* Mark the display of window W as accurate or inaccurate. If 13725/* Mark the display of leaf window W as accurate or inaccurate.
13726 ACCURATE_P is non-zero mark display of W as accurate. If 13726 If ACCURATE_P is non-zero mark display of W as accurate. If
13727 ACCURATE_P is zero, arrange for W to be redisplayed the next time 13727 ACCURATE_P is zero, arrange for W to be redisplayed the next
13728 redisplay_internal is called. */ 13728 time redisplay_internal is called. */
13729 13729
13730static void 13730static void
13731mark_window_display_accurate_1 (struct window *w, int accurate_p) 13731mark_window_display_accurate_1 (struct window *w, int accurate_p)
13732{ 13732{
13733 if (BUFFERP (w->buffer)) 13733 struct buffer *b = XBUFFER (w->buffer);
13734 {
13735 struct buffer *b = XBUFFER (w->buffer);
13736 13734
13737 w->last_modified = accurate_p ? BUF_MODIFF (b) : 0; 13735 w->last_modified = accurate_p ? BUF_MODIFF (b) : 0;
13738 w->last_overlay_modified = accurate_p ? BUF_OVERLAY_MODIFF (b) : 0; 13736 w->last_overlay_modified = accurate_p ? BUF_OVERLAY_MODIFF (b) : 0;
13739 w->last_had_star 13737 w->last_had_star = BUF_MODIFF (b) > BUF_SAVE_MODIFF (b);
13740 = BUF_MODIFF (b) > BUF_SAVE_MODIFF (b);
13741 13738
13742 if (accurate_p) 13739 if (accurate_p)
13743 { 13740 {
13744 b->clip_changed = 0; 13741 b->clip_changed = 0;
13745 b->prevent_redisplay_optimizations_p = 0; 13742 b->prevent_redisplay_optimizations_p = 0;
13746 13743
13747 BUF_UNCHANGED_MODIFIED (b) = BUF_MODIFF (b); 13744 BUF_UNCHANGED_MODIFIED (b) = BUF_MODIFF (b);
13748 BUF_OVERLAY_UNCHANGED_MODIFIED (b) = BUF_OVERLAY_MODIFF (b); 13745 BUF_OVERLAY_UNCHANGED_MODIFIED (b) = BUF_OVERLAY_MODIFF (b);
13749 BUF_BEG_UNCHANGED (b) = BUF_GPT (b) - BUF_BEG (b); 13746 BUF_BEG_UNCHANGED (b) = BUF_GPT (b) - BUF_BEG (b);
13750 BUF_END_UNCHANGED (b) = BUF_Z (b) - BUF_GPT (b); 13747 BUF_END_UNCHANGED (b) = BUF_Z (b) - BUF_GPT (b);
13751 13748
13752 w->current_matrix->buffer = b; 13749 w->current_matrix->buffer = b;
13753 w->current_matrix->begv = BUF_BEGV (b); 13750 w->current_matrix->begv = BUF_BEGV (b);
13754 w->current_matrix->zv = BUF_ZV (b); 13751 w->current_matrix->zv = BUF_ZV (b);
13755 13752
13756 w->last_cursor = w->cursor; 13753 w->last_cursor = w->cursor;
13757 w->last_cursor_off_p = w->cursor_off_p; 13754 w->last_cursor_off_p = w->cursor_off_p;
13758 13755
13759 if (w == XWINDOW (selected_window)) 13756 if (w == XWINDOW (selected_window))
13760 w->last_point = BUF_PT (b); 13757 w->last_point = BUF_PT (b);
13761 else 13758 else
13762 w->last_point = marker_position (w->pointm); 13759 w->last_point = marker_position (w->pointm);
13763 }
13764 }
13765 13760
13766 if (accurate_p)
13767 {
13768 wset_window_end_valid (w, w->buffer); 13761 wset_window_end_valid (w, w->buffer);
13769 w->update_mode_line = 0; 13762 w->update_mode_line = 0;
13770 } 13763 }
@@ -13784,25 +13777,21 @@ mark_window_display_accurate (Lisp_Object window, int accurate_p)
13784 for (; !NILP (window); window = w->next) 13777 for (; !NILP (window); window = w->next)
13785 { 13778 {
13786 w = XWINDOW (window); 13779 w = XWINDOW (window);
13787 mark_window_display_accurate_1 (w, accurate_p);
13788
13789 if (!NILP (w->vchild)) 13780 if (!NILP (w->vchild))
13790 mark_window_display_accurate (w->vchild, accurate_p); 13781 mark_window_display_accurate (w->vchild, accurate_p);
13791 if (!NILP (w->hchild)) 13782 else if (!NILP (w->hchild))
13792 mark_window_display_accurate (w->hchild, accurate_p); 13783 mark_window_display_accurate (w->hchild, accurate_p);
13784 else if (BUFFERP (w->buffer))
13785 mark_window_display_accurate_1 (w, accurate_p);
13793 } 13786 }
13794 13787
13795 if (accurate_p) 13788 if (accurate_p)
13796 { 13789 update_overlay_arrows (1);
13797 update_overlay_arrows (1);
13798 }
13799 else 13790 else
13800 { 13791 /* Force a thorough redisplay the next time by setting
13801 /* Force a thorough redisplay the next time by setting 13792 last_arrow_position and last_arrow_string to t, which is
13802 last_arrow_position and last_arrow_string to t, which is 13793 unequal to any useful value of Voverlay_arrow_... */
13803 unequal to any useful value of Voverlay_arrow_... */ 13794 update_overlay_arrows (-1);
13804 update_overlay_arrows (-1);
13805 }
13806} 13795}
13807 13796
13808 13797