diff options
| author | Dmitry Antipov | 2013-01-22 15:48:00 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-01-22 15:48:00 +0400 |
| commit | 9d93ce29bdf8aa277123170ef37f942f87e5073b (patch) | |
| tree | d79715a54dab1dd39d37a71f8dc24e153e5af485 /src/window.c | |
| parent | 1dcb8ea26301d187273787450fda118f5fc3c1a6 (diff) | |
| download | emacs-9d93ce29bdf8aa277123170ef37f942f87e5073b.tar.gz emacs-9d93ce29bdf8aa277123170ef37f942f87e5073b.zip | |
* window.h (struct window): Change window_end_valid member from
Lisp_Object to a bitfield. Adjust comments.
(wset_window_end_valid): Remove.
* window.c (adjust_window_count): Clear window_end_valid.
(Fwindow_end): Adjust user. Remove ancient #if 0 code.
(Fwindow_line_height, set_window_buffer, Frecenter)
(Fsplit_window_internal, Fdelete_other_windows_internal)
(Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
* dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
* xdisp.c (check_window_end, reconsider_clip_changes)
(redisplay_internal, mark_window_display_accurate_1, redisplay_window)
(try_window, try_window_reusing_current_matrix, note_mouse_highlight)
(find_first_unchanged_at_end_row, try_window_id): Likewise.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/window.c b/src/window.c index e60b9e8967d..db00bc26482 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -286,6 +286,8 @@ adjust_window_count (struct window *w, int arg) | |||
| 286 | b = b->base_buffer; | 286 | b = b->base_buffer; |
| 287 | b->window_count += arg; | 287 | b->window_count += arg; |
| 288 | eassert (b->window_count >= 0); | 288 | eassert (b->window_count >= 0); |
| 289 | /* Catch redisplay's attention. */ | ||
| 290 | w->window_end_valid = 0; | ||
| 289 | } | 291 | } |
| 290 | } | 292 | } |
| 291 | 293 | ||
| @@ -1489,17 +1491,8 @@ if it isn't already recorded. */) | |||
| 1489 | CHECK_BUFFER (buf); | 1491 | CHECK_BUFFER (buf); |
| 1490 | b = XBUFFER (buf); | 1492 | b = XBUFFER (buf); |
| 1491 | 1493 | ||
| 1492 | #if 0 /* This change broke some things. We should make it later. */ | ||
| 1493 | /* If we don't know the end position, return nil. | ||
| 1494 | The user can compute it with vertical-motion if he wants to. | ||
| 1495 | It would be nicer to do it automatically, | ||
| 1496 | but that's so slow that it would probably bother people. */ | ||
| 1497 | if (NILP (w->window_end_valid)) | ||
| 1498 | return Qnil; | ||
| 1499 | #endif | ||
| 1500 | |||
| 1501 | if (! NILP (update) | 1494 | if (! NILP (update) |
| 1502 | && (windows_or_buffers_changed || NILP (w->window_end_valid)) | 1495 | && (windows_or_buffers_changed || !w->window_end_valid) |
| 1503 | && !noninteractive) | 1496 | && !noninteractive) |
| 1504 | { | 1497 | { |
| 1505 | struct text_pos startp; | 1498 | struct text_pos startp; |
| @@ -1706,7 +1699,7 @@ Return nil if window display is not up-to-date. In that case, use | |||
| 1706 | b = XBUFFER (w->buffer); | 1699 | b = XBUFFER (w->buffer); |
| 1707 | 1700 | ||
| 1708 | /* Fail if current matrix is not up-to-date. */ | 1701 | /* Fail if current matrix is not up-to-date. */ |
| 1709 | if (NILP (w->window_end_valid) | 1702 | if (!w->window_end_valid |
| 1710 | || current_buffer->clip_changed | 1703 | || current_buffer->clip_changed |
| 1711 | || current_buffer->prevent_redisplay_optimizations_p | 1704 | || current_buffer->prevent_redisplay_optimizations_p |
| 1712 | || w->last_modified < BUF_MODIFF (b) | 1705 | || w->last_modified < BUF_MODIFF (b) |
| @@ -2038,7 +2031,7 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag) | |||
| 2038 | n->pseudo_window_p = 0; | 2031 | n->pseudo_window_p = 0; |
| 2039 | wset_window_end_vpos (n, make_number (0)); | 2032 | wset_window_end_vpos (n, make_number (0)); |
| 2040 | wset_window_end_pos (n, make_number (0)); | 2033 | wset_window_end_pos (n, make_number (0)); |
| 2041 | wset_window_end_valid (n, Qnil); | 2034 | n->window_end_valid = 0; |
| 2042 | n->frozen_window_start_p = 0; | 2035 | n->frozen_window_start_p = 0; |
| 2043 | } | 2036 | } |
| 2044 | 2037 | ||
| @@ -2973,7 +2966,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2973 | pos = *vmotion (startpos, -top, w); | 2966 | pos = *vmotion (startpos, -top, w); |
| 2974 | 2967 | ||
| 2975 | set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); | 2968 | set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); |
| 2976 | wset_window_end_valid (w, Qnil); | 2969 | w->window_end_valid = 0; |
| 2977 | w->start_at_line_beg = (pos.bytepos == BEGV_BYTE | 2970 | w->start_at_line_beg = (pos.bytepos == BEGV_BYTE |
| 2978 | || FETCH_BYTE (pos.bytepos - 1) == '\n'); | 2971 | || FETCH_BYTE (pos.bytepos - 1) == '\n'); |
| 2979 | /* We need to do this, so that the window-scroll-functions | 2972 | /* We need to do this, so that the window-scroll-functions |
| @@ -3189,7 +3182,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 3189 | wset_window_end_pos (w, make_number (0)); | 3182 | wset_window_end_pos (w, make_number (0)); |
| 3190 | wset_window_end_vpos (w, make_number (0)); | 3183 | wset_window_end_vpos (w, make_number (0)); |
| 3191 | memset (&w->last_cursor, 0, sizeof w->last_cursor); | 3184 | memset (&w->last_cursor, 0, sizeof w->last_cursor); |
| 3192 | wset_window_end_valid (w, Qnil); | 3185 | |
| 3193 | if (!(keep_margins_p && samebuf)) | 3186 | if (!(keep_margins_p && samebuf)) |
| 3194 | { /* If we're not actually changing the buffer, don't reset hscroll and | 3187 | { /* If we're not actually changing the buffer, don't reset hscroll and |
| 3195 | vscroll. This case happens for example when called from | 3188 | vscroll. This case happens for example when called from |
| @@ -3958,7 +3951,7 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3958 | wset_next (o, new); | 3951 | wset_next (o, new); |
| 3959 | } | 3952 | } |
| 3960 | 3953 | ||
| 3961 | wset_window_end_valid (n, Qnil); | 3954 | n->window_end_valid = 0; |
| 3962 | memset (&n->last_cursor, 0, sizeof n->last_cursor); | 3955 | memset (&n->last_cursor, 0, sizeof n->last_cursor); |
| 3963 | 3956 | ||
| 3964 | /* Get special geometry settings from reference window. */ | 3957 | /* Get special geometry settings from reference window. */ |
| @@ -5368,7 +5361,7 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5368 | 5361 | ||
| 5369 | /* Set the new window start. */ | 5362 | /* Set the new window start. */ |
| 5370 | set_marker_both (w->start, w->buffer, charpos, bytepos); | 5363 | set_marker_both (w->start, w->buffer, charpos, bytepos); |
| 5371 | wset_window_end_valid (w, Qnil); | 5364 | w->window_end_valid = 0; |
| 5372 | 5365 | ||
| 5373 | w->optional_new_start = 1; | 5366 | w->optional_new_start = 1; |
| 5374 | 5367 | ||
| @@ -6319,7 +6312,7 @@ display marginal areas and the text area. */) | |||
| 6319 | adjust_window_margins (w); | 6312 | adjust_window_margins (w); |
| 6320 | 6313 | ||
| 6321 | clear_glyph_matrix (w->current_matrix); | 6314 | clear_glyph_matrix (w->current_matrix); |
| 6322 | wset_window_end_valid (w, Qnil); | 6315 | w->window_end_valid = 0; |
| 6323 | 6316 | ||
| 6324 | ++windows_or_buffers_changed; | 6317 | ++windows_or_buffers_changed; |
| 6325 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); | 6318 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); |
| @@ -6389,7 +6382,7 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */) | |||
| 6389 | adjust_window_margins (w); | 6382 | adjust_window_margins (w); |
| 6390 | 6383 | ||
| 6391 | clear_glyph_matrix (w->current_matrix); | 6384 | clear_glyph_matrix (w->current_matrix); |
| 6392 | wset_window_end_valid (w, Qnil); | 6385 | w->window_end_valid = 0; |
| 6393 | 6386 | ||
| 6394 | ++windows_or_buffers_changed; | 6387 | ++windows_or_buffers_changed; |
| 6395 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); | 6388 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); |