From b41b8a7eff8382797d373dcd0ea91ae3ec5fa562 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Jan 2013 22:10:20 -0800 Subject: * fileio.c (Finsert_file_contents): Simplify. Remove unnecessary assignments and tests. --- src/ChangeLog | 5 +++++ src/fileio.c | 19 +++++-------------- 2 files changed, 10 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index ca37bb3ea56..57e024757ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-01-22 Paul Eggert + + * fileio.c (Finsert_file_contents): Simplify. + Remove unnecessary assignments and tests. + 2013-01-21 Eli Zaretskii * w32.c (acl_set_file): Don't test for errors unless diff --git a/src/fileio.c b/src/fileio.c index 175f363ec92..a826ac1f94a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3573,7 +3573,6 @@ by calling `format-decode', which see. */) report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); mtime = time_error_value (save_errno); st.st_size = -1; - how_much = 0; if (!NILP (Vcoding_system_for_read)) Fset (Qbuffer_file_coding_system, Vcoding_system_for_read); goto notfound; @@ -4008,30 +4007,25 @@ by calling `format-decode', which see. */) report_file_error ("Setting file position", Fcons (orig_filename, Qnil)); - total = st.st_size; /* Total bytes in the file. */ - how_much = 0; /* Bytes read from file so far. */ inserted = 0; /* Bytes put into CONVERSION_BUFFER so far. */ unprocessed = 0; /* Bytes not processed in previous loop. */ GCPRO1 (conversion_buffer); - while (how_much < total) + while (1) { - /* We read one bunch by one (READ_BUF_SIZE bytes) to allow - quitting while reading a huge while. */ - /* `try'' is reserved in some compilers (Microsoft C). */ - int trytry = min (total - how_much, READ_BUF_SIZE - unprocessed); + /* Read at most READ_BUF_SIZE bytes at a time, to allow + quitting while reading a huge file. */ /* Allow quitting out of the actual I/O. */ immediate_quit = 1; QUIT; - this = emacs_read (fd, read_buf + unprocessed, trytry); + this = emacs_read (fd, read_buf + unprocessed, + READ_BUF_SIZE - unprocessed); immediate_quit = 0; if (this <= 0) break; - how_much += this; - BUF_TEMP_SET_PT (XBUFFER (conversion_buffer), BUF_Z (XBUFFER (conversion_buffer))); decode_coding_c_string (&coding, (unsigned char *) read_buf, @@ -4048,9 +4042,6 @@ by calling `format-decode', which see. */) so defer the removal till we reach the `handled' label. */ deferred_remove_unwind_protect = 1; - /* At this point, HOW_MUCH should equal TOTAL, or should be <= 0 - if we couldn't read the file. */ - if (this < 0) error ("IO error reading %s: %s", SDATA (orig_filename), emacs_strerror (errno)); -- cgit v1.2.1 From 593a5f2efdac581be0964c0eb8583dde2b661173 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Jan 2013 23:48:59 -0800 Subject: * emacs.c (Qkill_emacs_hook): Now static. --- src/ChangeLog | 2 ++ src/emacs.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 57e024757ec..a06f9e2fcd5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2013-01-22 Paul Eggert + * emacs.c (Qkill_emacs_hook): Now static. + * fileio.c (Finsert_file_contents): Simplify. Remove unnecessary assignments and tests. diff --git a/src/emacs.c b/src/emacs.c index b7888d343f1..597fb2daf95 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -133,7 +133,8 @@ Lisp_Object Qfile_name_handler_alist; Lisp_Object Qrisky_local_variable; -Lisp_Object Qkill_emacs, Qkill_emacs_hook; +Lisp_Object Qkill_emacs; +static Lisp_Object Qkill_emacs_hook; /* If true, Emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started. */ -- cgit v1.2.1 From 1dcb8ea26301d187273787450fda118f5fc3c1a6 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Tue, 22 Jan 2013 15:41:21 +0400 Subject: * 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. --- src/ChangeLog | 9 +++++++ src/xdisp.c | 77 +++++++++++++++++++++++++---------------------------------- 2 files changed, 42 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index a06f9e2fcd5..ec7f8f068bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2013-01-22 Dmitry Antipov + + * 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. + 2013-01-22 Paul Eggert * 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) } -/* Mark the display of window W as accurate or inaccurate. If - ACCURATE_P is non-zero mark display of W as accurate. If - ACCURATE_P is zero, arrange for W to be redisplayed the next time - redisplay_internal is called. */ +/* Mark the display of leaf window W as accurate or inaccurate. + If ACCURATE_P is non-zero mark display of W as accurate. If + ACCURATE_P is zero, arrange for W to be redisplayed the next + time redisplay_internal is called. */ static void mark_window_display_accurate_1 (struct window *w, int accurate_p) { - if (BUFFERP (w->buffer)) - { - struct buffer *b = XBUFFER (w->buffer); + struct buffer *b = XBUFFER (w->buffer); - w->last_modified = accurate_p ? BUF_MODIFF (b) : 0; - w->last_overlay_modified = accurate_p ? BUF_OVERLAY_MODIFF (b) : 0; - w->last_had_star - = BUF_MODIFF (b) > BUF_SAVE_MODIFF (b); + w->last_modified = accurate_p ? BUF_MODIFF (b) : 0; + w->last_overlay_modified = accurate_p ? BUF_OVERLAY_MODIFF (b) : 0; + w->last_had_star = BUF_MODIFF (b) > BUF_SAVE_MODIFF (b); - if (accurate_p) - { - b->clip_changed = 0; - b->prevent_redisplay_optimizations_p = 0; + if (accurate_p) + { + b->clip_changed = 0; + b->prevent_redisplay_optimizations_p = 0; - BUF_UNCHANGED_MODIFIED (b) = BUF_MODIFF (b); - BUF_OVERLAY_UNCHANGED_MODIFIED (b) = BUF_OVERLAY_MODIFF (b); - BUF_BEG_UNCHANGED (b) = BUF_GPT (b) - BUF_BEG (b); - BUF_END_UNCHANGED (b) = BUF_Z (b) - BUF_GPT (b); + BUF_UNCHANGED_MODIFIED (b) = BUF_MODIFF (b); + BUF_OVERLAY_UNCHANGED_MODIFIED (b) = BUF_OVERLAY_MODIFF (b); + BUF_BEG_UNCHANGED (b) = BUF_GPT (b) - BUF_BEG (b); + BUF_END_UNCHANGED (b) = BUF_Z (b) - BUF_GPT (b); - w->current_matrix->buffer = b; - w->current_matrix->begv = BUF_BEGV (b); - w->current_matrix->zv = BUF_ZV (b); + w->current_matrix->buffer = b; + w->current_matrix->begv = BUF_BEGV (b); + w->current_matrix->zv = BUF_ZV (b); - w->last_cursor = w->cursor; - w->last_cursor_off_p = w->cursor_off_p; + w->last_cursor = w->cursor; + w->last_cursor_off_p = w->cursor_off_p; - if (w == XWINDOW (selected_window)) - w->last_point = BUF_PT (b); - else - w->last_point = marker_position (w->pointm); - } - } + if (w == XWINDOW (selected_window)) + w->last_point = BUF_PT (b); + else + w->last_point = marker_position (w->pointm); - if (accurate_p) - { wset_window_end_valid (w, w->buffer); w->update_mode_line = 0; } @@ -13784,25 +13777,21 @@ mark_window_display_accurate (Lisp_Object window, int accurate_p) for (; !NILP (window); window = w->next) { w = XWINDOW (window); - mark_window_display_accurate_1 (w, accurate_p); - if (!NILP (w->vchild)) mark_window_display_accurate (w->vchild, accurate_p); - if (!NILP (w->hchild)) + else if (!NILP (w->hchild)) mark_window_display_accurate (w->hchild, accurate_p); + else if (BUFFERP (w->buffer)) + mark_window_display_accurate_1 (w, accurate_p); } if (accurate_p) - { - update_overlay_arrows (1); - } + update_overlay_arrows (1); else - { - /* Force a thorough redisplay the next time by setting - last_arrow_position and last_arrow_string to t, which is - unequal to any useful value of Voverlay_arrow_... */ - update_overlay_arrows (-1); - } + /* Force a thorough redisplay the next time by setting + last_arrow_position and last_arrow_string to t, which is + unequal to any useful value of Voverlay_arrow_... */ + update_overlay_arrows (-1); } -- cgit v1.2.1 From 9d93ce29bdf8aa277123170ef37f942f87e5073b Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Tue, 22 Jan 2013 15:48:00 +0400 Subject: * 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. --- src/ChangeLog | 16 ++++++++++++++++ src/dispnew.c | 4 ++-- src/window.c | 29 +++++++++++------------------ src/window.h | 26 +++++++++++--------------- src/xdisp.c | 45 +++++++++++++++++++++------------------------ 5 files changed, 61 insertions(+), 59 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index ec7f8f068bd..7dc7b25f85a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2013-01-22 Dmitry Antipov + + * 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. + 2013-01-22 Dmitry Antipov * xdisp.c (mark_window_display_accurate): Simplify the loop diff --git a/src/dispnew.c b/src/dispnew.c index 1e9d94f3789..0dba576e101 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -607,7 +607,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y are invalidated below. */ if (INTEGERP (w->window_end_vpos) && XFASTINT (w->window_end_vpos) >= i) - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; while (i < matrix->nrows) matrix->rows[i++].enabled_p = 0; @@ -862,7 +862,7 @@ clear_window_matrices (struct window *w, bool desired_p) else { clear_glyph_matrix (w->current_matrix); - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; } } 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) b = b->base_buffer; b->window_count += arg; eassert (b->window_count >= 0); + /* Catch redisplay's attention. */ + w->window_end_valid = 0; } } @@ -1489,17 +1491,8 @@ if it isn't already recorded. */) CHECK_BUFFER (buf); b = XBUFFER (buf); -#if 0 /* This change broke some things. We should make it later. */ - /* If we don't know the end position, return nil. - The user can compute it with vertical-motion if he wants to. - It would be nicer to do it automatically, - but that's so slow that it would probably bother people. */ - if (NILP (w->window_end_valid)) - return Qnil; -#endif - if (! NILP (update) - && (windows_or_buffers_changed || NILP (w->window_end_valid)) + && (windows_or_buffers_changed || !w->window_end_valid) && !noninteractive) { struct text_pos startp; @@ -1706,7 +1699,7 @@ Return nil if window display is not up-to-date. In that case, use b = XBUFFER (w->buffer); /* Fail if current matrix is not up-to-date. */ - if (NILP (w->window_end_valid) + if (!w->window_end_valid || current_buffer->clip_changed || current_buffer->prevent_redisplay_optimizations_p || w->last_modified < BUF_MODIFF (b) @@ -2038,7 +2031,7 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag) n->pseudo_window_p = 0; wset_window_end_vpos (n, make_number (0)); wset_window_end_pos (n, make_number (0)); - wset_window_end_valid (n, Qnil); + n->window_end_valid = 0; n->frozen_window_start_p = 0; } @@ -2973,7 +2966,7 @@ window-start value is reasonable when this function is called. */) pos = *vmotion (startpos, -top, w); set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; w->start_at_line_beg = (pos.bytepos == BEGV_BYTE || FETCH_BYTE (pos.bytepos - 1) == '\n'); /* 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 wset_window_end_pos (w, make_number (0)); wset_window_end_vpos (w, make_number (0)); memset (&w->last_cursor, 0, sizeof w->last_cursor); - wset_window_end_valid (w, Qnil); + if (!(keep_margins_p && samebuf)) { /* If we're not actually changing the buffer, don't reset hscroll and 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. */) wset_next (o, new); } - wset_window_end_valid (n, Qnil); + n->window_end_valid = 0; memset (&n->last_cursor, 0, sizeof n->last_cursor); /* Get special geometry settings from reference window. */ @@ -5368,7 +5361,7 @@ and redisplay normally--don't erase and redraw the frame. */) /* Set the new window start. */ set_marker_both (w->start, w->buffer, charpos, bytepos); - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; w->optional_new_start = 1; @@ -6319,7 +6312,7 @@ display marginal areas and the text area. */) adjust_window_margins (w); clear_glyph_matrix (w->current_matrix); - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; ++windows_or_buffers_changed; adjust_glyphs (XFRAME (WINDOW_FRAME (w))); @@ -6389,7 +6382,7 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */) adjust_window_margins (w); clear_glyph_matrix (w->current_matrix); - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; ++windows_or_buffers_changed; adjust_glyphs (XFRAME (WINDOW_FRAME (w))); diff --git a/src/window.h b/src/window.h index 1ebd35a7c64..135f591ded7 100644 --- a/src/window.h +++ b/src/window.h @@ -175,17 +175,13 @@ struct window no scroll bar. A value of t means use frame value. */ Lisp_Object vertical_scroll_bar_type; - /* Z - the buffer position of the last glyph in the current matrix - of W. Only valid if WINDOW_END_VALID is not nil. */ + /* Z - the buffer position of the last glyph in the current + matrix of W. Only valid if window_end_valid is nonzero. */ Lisp_Object window_end_pos; + /* Glyph matrix row of the last glyph in the current matrix - of W. Only valid if WINDOW_END_VALID is not nil. */ + of W. Only valid if window_end_valid is nonzero. */ Lisp_Object window_end_vpos; - /* t if window_end_pos is truly valid. - This is nil if nontrivial redisplay is preempted - since in that case the frame image that window_end_pos - did not get onto the frame. */ - Lisp_Object window_end_valid; /* Display-table to use for displaying chars in this window. Nil means use the buffer's own display-table. */ @@ -339,12 +335,17 @@ struct window Otherwise draw them between margin areas and text. */ unsigned fringes_outside_margins : 1; + /* Nonzero if window_end_pos and window_end_vpos are truly valid. + This is zero if nontrivial redisplay is preempted since in that case + the frame image that window_end_pos did not get onto the frame. */ + unsigned window_end_valid : 1; + /* Amount by which lines of this window are scrolled in y-direction (smooth scrolling). */ int vscroll; - /* Z_BYTE - Buffer position of the last glyph in the current matrix of W. - Should be nonnegative, and only valid if window_end_valid is not nil. */ + /* Z_BYTE - buffer position of the last glyph in the current matrix of W. + Should be nonnegative, and only valid if window_end_valid is nonzero. */ ptrdiff_t window_end_bytepos; }; @@ -401,11 +402,6 @@ wset_window_end_pos (struct window *w, Lisp_Object val) w->window_end_pos = val; } WINDOW_INLINE void -wset_window_end_valid (struct window *w, Lisp_Object val) -{ - w->window_end_valid = val; -} -WINDOW_INLINE void wset_window_end_vpos (struct window *w, Lisp_Object val) { w->window_end_vpos = val; diff --git a/src/xdisp.c b/src/xdisp.c index 69a8a02b2cb..d663e56acc0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2539,8 +2539,7 @@ check_it (struct it *it) static void check_window_end (struct window *w) { - if (!MINI_WINDOW_P (w) - && !NILP (w->window_end_valid)) + if (!MINI_WINDOW_P (w) && w->window_end_valid) { struct glyph_row *row; eassert ((row = MATRIX_ROW (w->current_matrix, @@ -12922,10 +12921,10 @@ static void reconsider_clip_changes (struct window *w, struct buffer *b) { if (b->clip_changed - && !NILP (w->window_end_valid) - && w->current_matrix->buffer == b - && w->current_matrix->zv == BUF_ZV (b) - && w->current_matrix->begv == BUF_BEGV (b)) + && w->window_end_valid + && w->current_matrix->buffer == b + && w->current_matrix->zv == BUF_ZV (b) + && w->current_matrix->begv == BUF_BEGV (b)) b->clip_changed = 0; /* If display wasn't paused, and W is not a tool bar window, see if @@ -12933,8 +12932,7 @@ reconsider_clip_changes (struct window *w, struct buffer *b) we set b->clip_changed to 1 to force updating the screen. If b->clip_changed has already been set to 1, we can skip this check. */ - if (!b->clip_changed - && BUFFERP (w->buffer) && !NILP (w->window_end_valid)) + if (!b->clip_changed && BUFFERP (w->buffer) && w->window_end_valid) { ptrdiff_t pt; @@ -13328,7 +13326,7 @@ redisplay_internal (void) else if (XFASTINT (w->window_end_vpos) == this_line_vpos && this_line_vpos > 0) wset_window_end_vpos (w, make_number (this_line_vpos - 1)); - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; /* Update hint: No need to try to scroll in update_window. */ w->desired_matrix->no_scrolling_p = 1; @@ -13758,7 +13756,7 @@ mark_window_display_accurate_1 (struct window *w, int accurate_p) else w->last_point = marker_position (w->pointm); - wset_window_end_valid (w, w->buffer); + w->window_end_valid = 1; w->update_mode_line = 0; } } @@ -15460,7 +15458,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) set_buffer_internal_1 (XBUFFER (w->buffer)); current_matrix_up_to_date_p - = (!NILP (w->window_end_valid) + = (w->window_end_valid && !current_buffer->clip_changed && !current_buffer->prevent_redisplay_optimizations_p && !window_outdated (w)); @@ -15483,7 +15481,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) specbind (Qinhibit_point_motion_hooks, Qt); buffer_unchanged_p - = (!NILP (w->window_end_valid) + = (w->window_end_valid && !current_buffer->clip_changed && !window_outdated (w)); @@ -15496,7 +15494,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) if (XMARKER (w->start)->buffer == current_buffer) compute_window_start_on_continuation_line (w); - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; } /* Some sanity checks. */ @@ -15585,7 +15583,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) w->force_start = 0; w->vscroll = 0; - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; /* Forget any recorded base line for line number display. */ if (!buffer_unchanged_p) @@ -16034,8 +16032,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) line.) */ if (w->cursor.vpos < 0) { - if (!NILP (w->window_end_valid) - && PT >= Z - XFASTINT (w->window_end_pos)) + if (w->window_end_valid && PT >= Z - XFASTINT (w->window_end_pos)) { clear_glyph_matrix (w->desired_matrix); move_it_by_lines (&it, 1); @@ -16352,7 +16349,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags) } /* But that is not valid info until redisplay finishes. */ - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; return 1; } @@ -16599,7 +16596,7 @@ try_window_reusing_current_matrix (struct window *w) wset_window_end_pos (w, make_number (Z - ZV)); wset_window_end_vpos (w, make_number (0)); } - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; /* Update hint: don't try scrolling again in update_window. */ w->desired_matrix->no_scrolling_p = 1; @@ -16797,7 +16794,7 @@ try_window_reusing_current_matrix (struct window *w) (w, make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled)); } - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; w->desired_matrix->no_scrolling_p = 1; #ifdef GLYPH_DEBUG @@ -16930,7 +16927,7 @@ find_first_unchanged_at_end_row (struct window *w, /* Display must not have been paused, otherwise the current matrix is not up to date. */ - eassert (!NILP (w->window_end_valid)); + eassert (w->window_end_valid); /* A value of window_end_pos >= END_UNCHANGED means that the window end is in the range of changed text. If so, there is no @@ -17114,7 +17111,7 @@ row_containing_pos (struct window *w, ptrdiff_t charpos, /* Try to redisplay window W by reusing its existing display. W's current matrix must be up to date when this function is called, - i.e. window_end_valid must not be nil. + i.e. window_end_valid must be nonzero. Value is @@ -17222,7 +17219,7 @@ try_window_id (struct window *w) GIVE_UP (7); /* Verify that display wasn't paused. */ - if (NILP (w->window_end_valid)) + if (!w->window_end_valid) GIVE_UP (8); /* Can't use this if highlighting a region because a cursor movement @@ -17873,7 +17870,7 @@ try_window_id (struct window *w) debug_end_vpos = XFASTINT (w->window_end_vpos)); /* Record that display has not been completed. */ - wset_window_end_valid (w, Qnil); + w->window_end_valid = 0; w->desired_matrix->no_scrolling_p = 1; return 3; @@ -27782,7 +27779,7 @@ note_mouse_highlight (struct frame *f, int x, int y) And verify the buffer's text has not changed. */ b = XBUFFER (w->buffer); if (part == ON_TEXT - && EQ (w->window_end_valid, w->buffer) + && w->window_end_valid && w->last_modified == BUF_MODIFF (b) && w->last_overlay_modified == BUF_OVERLAY_MODIFF (b)) { -- cgit v1.2.1