aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c58
1 files changed, 28 insertions, 30 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 6f9cd70e5a3..28a3b868da0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -857,16 +857,16 @@ update:
857 beg_unchanged = BUF_GPT (b) - BUF_BEG (b); 857 beg_unchanged = BUF_GPT (b) - BUF_BEG (b);
858 end_unchanged = BUF_Z (b) - BUF_GPT (b); 858 end_unchanged = BUF_Z (b) - BUF_GPT (b);
859 859
860 XFASTINT (w->last_point) = BUF_PT (b); 860 XSETFASTINT (w->last_point, BUF_PT (b));
861 XFASTINT (w->last_point_x) = FRAME_CURSOR_X (selected_frame); 861 XSETFASTINT (w->last_point_x, FRAME_CURSOR_X (selected_frame));
862 XFASTINT (w->last_point_y) = FRAME_CURSOR_Y (selected_frame); 862 XSETFASTINT (w->last_point_y, FRAME_CURSOR_Y (selected_frame));
863 863
864 if (all_windows) 864 if (all_windows)
865 mark_window_display_accurate (FRAME_ROOT_WINDOW (selected_frame), 1); 865 mark_window_display_accurate (FRAME_ROOT_WINDOW (selected_frame), 1);
866 else 866 else
867 { 867 {
868 w->update_mode_line = Qnil; 868 w->update_mode_line = Qnil;
869 XFASTINT (w->last_modified) = BUF_MODIFF (b); 869 XSETFASTINT (w->last_modified, BUF_MODIFF (b));
870 w->window_end_valid = w->buffer; 870 w->window_end_valid = w->buffer;
871 last_arrow_position = Voverlay_arrow_position; 871 last_arrow_position = Voverlay_arrow_position;
872 last_arrow_string = Voverlay_arrow_string; 872 last_arrow_string = Voverlay_arrow_string;
@@ -933,10 +933,8 @@ mark_window_display_accurate (window, flag)
933 933
934 if (!NILP (w->buffer)) 934 if (!NILP (w->buffer))
935 { 935 {
936 XFASTINT (w->last_modified) 936 XSETFASTINT (w->last_modified,
937 = !flag ? 0 937 !flag ? 0 : BUF_MODIFF (XBUFFER (w->buffer)));
938 : XBUFFER (w->buffer) == current_buffer
939 ? MODIFF : BUF_MODIFF (XBUFFER (w->buffer));
940 938
941 /* Record if we are showing a region, so can make sure to 939 /* Record if we are showing a region, so can make sure to
942 update it fully at next redisplay. */ 940 update it fully at next redisplay. */
@@ -1142,7 +1140,7 @@ redisplay_window (window, just_this_one)
1142 w->base_line_number = Qnil; 1140 w->base_line_number = Qnil;
1143 w->update_mode_line = Qt; 1141 w->update_mode_line = Qt;
1144 w->force_start = Qnil; 1142 w->force_start = Qnil;
1145 XFASTINT (w->last_modified) = 0; 1143 XSETFASTINT (w->last_modified, 0);
1146 if (startp < BEGV) startp = BEGV; 1144 if (startp < BEGV) startp = BEGV;
1147 if (startp > ZV) startp = ZV; 1145 if (startp > ZV) startp = ZV;
1148 try_window (window, startp); 1146 try_window (window, startp);
@@ -1275,7 +1273,7 @@ redisplay_window (window, just_this_one)
1275 cancel_my_columns (w); 1273 cancel_my_columns (w);
1276 } 1274 }
1277 1275
1278 XFASTINT (w->last_modified) = 0; 1276 XSETFASTINT (w->last_modified, 0);
1279 w->update_mode_line = Qt; 1277 w->update_mode_line = Qt;
1280 1278
1281 /* Try to scroll by specified few lines */ 1279 /* Try to scroll by specified few lines */
@@ -1438,8 +1436,8 @@ try_window (window, pos)
1438 w->update_mode_line = Qt; 1436 w->update_mode_line = Qt;
1439 1437
1440 /* Say where last char on frame will be, once redisplay is finished. */ 1438 /* Say where last char on frame will be, once redisplay is finished. */
1441 XFASTINT (w->window_end_pos) = Z - pos; 1439 XSETFASTINT (w->window_end_pos, Z - pos);
1442 XFASTINT (w->window_end_vpos) = last_text_vpos - XFASTINT (w->top); 1440 XSETFASTINT (w->window_end_vpos, last_text_vpos - XFASTINT (w->top));
1443 /* But that is not valid info until redisplay finishes. */ 1441 /* But that is not valid info until redisplay finishes. */
1444 w->window_end_valid = Qnil; 1442 w->window_end_valid = Qnil;
1445} 1443}
@@ -1500,8 +1498,8 @@ try_window_id (window)
1500 bp = *compute_motion (start, 0, lmargin, 1498 bp = *compute_motion (start, 0, lmargin,
1501 Z, height, 0, 1499 Z, height, 0,
1502 width, hscroll, pos_tab_offset (w, start), w); 1500 width, hscroll, pos_tab_offset (w, start), w);
1503 XFASTINT (w->window_end_vpos) = height; 1501 XSETFASTINT (w->window_end_vpos, height);
1504 XFASTINT (w->window_end_pos) = Z - bp.bufpos; 1502 XSETFASTINT (w->window_end_pos, Z - bp.bufpos);
1505 return 1; 1503 return 1;
1506 } 1504 }
1507 return 0; 1505 return 0;
@@ -1738,8 +1736,8 @@ try_window_id (window)
1738 include the split character in the text considered on the frame */ 1736 include the split character in the text considered on the frame */
1739 if (val.hpos < lmargin) 1737 if (val.hpos < lmargin)
1740 val.bufpos++; 1738 val.bufpos++;
1741 XFASTINT (w->window_end_vpos) = last_text_vpos; 1739 XSETFASTINT (w->window_end_vpos, last_text_vpos);
1742 XFASTINT (w->window_end_pos) = Z - val.bufpos; 1740 XSETFASTINT (w->window_end_pos, Z - val.bufpos);
1743 } 1741 }
1744 1742
1745 /* If scrolling made blank lines at window bottom, 1743 /* If scrolling made blank lines at window bottom,
@@ -1797,7 +1795,7 @@ try_window_id (window)
1797 { 1795 {
1798 val = *vmotion (Z - XFASTINT (w->window_end_pos), 1796 val = *vmotion (Z - XFASTINT (w->window_end_pos),
1799 delta, width, hscroll, window); 1797 delta, width, hscroll, window);
1800 XFASTINT (w->window_end_pos) = Z - val.bufpos; 1798 XSETFASTINT (w->window_end_pos, Z - val.bufpos);
1801 XFASTINT (w->window_end_vpos) += val.vpos; 1799 XFASTINT (w->window_end_vpos) += val.vpos;
1802 } 1800 }
1803 } 1801 }
@@ -2076,7 +2074,7 @@ display_text_line (w, start, vpos, hpos, taboffset)
2076 int current_face = 0; 2074 int current_face = 0;
2077 int i; 2075 int i;
2078 2076
2079 XFASTINT (default_invis_vector[2]) = '.'; 2077 XSETFASTINT (default_invis_vector[2], '.');
2080 default_invis_vector[0] = default_invis_vector[1] = default_invis_vector[2]; 2078 default_invis_vector[0] = default_invis_vector[1] = default_invis_vector[2];
2081 2079
2082 hpos += XFASTINT (w->left); 2080 hpos += XFASTINT (w->left);
@@ -2176,14 +2174,14 @@ display_text_line (w, start, vpos, hpos, taboffset)
2176 while (pos == next_invisible && pos < end) 2174 while (pos == next_invisible && pos < end)
2177 { 2175 {
2178 Lisp_Object position, limit, endpos, prop, ww; 2176 Lisp_Object position, limit, endpos, prop, ww;
2179 XFASTINT (position) = pos; 2177 XSETFASTINT (position, pos);
2180 XSETWINDOW (ww, w); 2178 XSETWINDOW (ww, w);
2181 prop = Fget_char_property (position, Qinvisible, ww); 2179 prop = Fget_char_property (position, Qinvisible, ww);
2182 /* This is just an estimate to give reasonable 2180 /* This is just an estimate to give reasonable
2183 performance; nothing should go wrong if it is too small. */ 2181 performance; nothing should go wrong if it is too small. */
2184 limit = Fnext_overlay_change (position); 2182 limit = Fnext_overlay_change (position);
2185 if (XFASTINT (limit) > pos + 50) 2183 if (XFASTINT (limit) > pos + 50)
2186 XFASTINT (limit) = pos + 50; 2184 XSETFASTINT (limit, pos + 50);
2187 endpos = Fnext_single_property_change (position, Qinvisible, 2185 endpos = Fnext_single_property_change (position, Qinvisible,
2188 Fcurrent_buffer (), limit); 2186 Fcurrent_buffer (), limit);
2189 if (INTEGERP (endpos)) 2187 if (INTEGERP (endpos))
@@ -2548,7 +2546,7 @@ display_text_line (w, start, vpos, hpos, taboffset)
2548 Lisp_Object face, ilisp; 2546 Lisp_Object face, ilisp;
2549 int newface; 2547 int newface;
2550 2548
2551 XFASTINT (ilisp) = i; 2549 XSETFASTINT (ilisp, i);
2552 face = Fget_text_property (ilisp, Qface, Voverlay_arrow_string); 2550 face = Fget_text_property (ilisp, Qface, Voverlay_arrow_string);
2553 newface = compute_glyph_face_1 (f, face, 0); 2551 newface = compute_glyph_face_1 (f, face, 0);
2554 leftmargin[i] = FAST_MAKE_GLYPH (c, newface); 2552 leftmargin[i] = FAST_MAKE_GLYPH (c, newface);
@@ -2601,7 +2599,7 @@ display_menu_bar (w)
2601 if (NILP (string)) 2599 if (NILP (string))
2602 break; 2600 break;
2603 2601
2604 XFASTINT (XVECTOR (items)->contents[i + 2]) = hpos; 2602 XSETFASTINT (XVECTOR (items)->contents[i + 2], hpos);
2605 2603
2606 if (hpos < maxendcol) 2604 if (hpos < maxendcol)
2607 hpos = display_string (XWINDOW (FRAME_ROOT_WINDOW (f)), vpos, 2605 hpos = display_string (XWINDOW (FRAME_ROOT_WINDOW (f)), vpos,
@@ -2994,8 +2992,8 @@ decode_mode_spec (w, c, maxwidth)
2994 go back past it. */ 2992 go back past it. */
2995 if (startpos == BUF_BEGV (b)) 2993 if (startpos == BUF_BEGV (b))
2996 { 2994 {
2997 XFASTINT (w->base_line_number) = topline; 2995 XSETFASTINT (w->base_line_number, topline);
2998 XFASTINT (w->base_line_pos) = BUF_BEGV (b); 2996 XSETFASTINT (w->base_line_pos, BUF_BEGV (b));
2999 } 2997 }
3000 else if (nlines < height + 25 || nlines > height * 3 + 50 2998 else if (nlines < height + 25 || nlines > height * 3 + 50
3001 || linepos == BUF_BEGV (b)) 2999 || linepos == BUF_BEGV (b))
@@ -3020,8 +3018,8 @@ decode_mode_spec (w, c, maxwidth)
3020 return "??"; 3018 return "??";
3021 } 3019 }
3022 3020
3023 XFASTINT (w->base_line_number) = topline - nlines; 3021 XSETFASTINT (w->base_line_number, topline - nlines);
3024 XFASTINT (w->base_line_pos) = position; 3022 XSETFASTINT (w->base_line_pos, position);
3025 } 3023 }
3026 3024
3027 /* Now count lines from the start pos to point. */ 3025 /* Now count lines from the start pos to point. */
@@ -3596,12 +3594,12 @@ init_xdisp ()
3596 if (!noninteractive) 3594 if (!noninteractive)
3597 { 3595 {
3598 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (root_window))); 3596 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (root_window)));
3599 XFASTINT (XWINDOW (root_window)->top) = 0; 3597 XSETFASTINT (XWINDOW (root_window)->top, 0);
3600 set_window_height (root_window, FRAME_HEIGHT (f) - 1, 0); 3598 set_window_height (root_window, FRAME_HEIGHT (f) - 1, 0);
3601 XFASTINT (mini_w->top) = FRAME_HEIGHT (f) - 1; 3599 XSETFASTINT (mini_w->top, FRAME_HEIGHT (f) - 1);
3602 set_window_height (minibuf_window, 1, 0); 3600 set_window_height (minibuf_window, 1, 0);
3603 3601
3604 XFASTINT (XWINDOW (root_window)->width) = FRAME_WIDTH (f); 3602 XSETFASTINT (XWINDOW (root_window)->width, FRAME_WIDTH (f));
3605 XFASTINT (mini_w->width) = FRAME_WIDTH (f); 3603 XSETFASTINT (mini_w->width, FRAME_WIDTH (f));
3606 } 3604 }
3607} 3605}