Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 5581:56144c8593a8
Mechanically change INT to FIXNUM in our sources.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT (where it refers to non-bignum Lisp
integers) to FIXNUM in our sources. Done for the following
functions, enums, and macros: Lisp_Type_Int_Even,
Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(),
XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(),
EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to
MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to
NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT.
The EMACS_INT typedef was not changed, it does not describe
non-bignum Lisp integers.
Script that did the change available in
http://mid.gmane.org/20067.17650.181273.12014@parhasard.net .
modules/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers. See the src/ChangeLog entry for more details.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (How Lisp Objects Are Represented in C):
* internals/internals.texi (Integers and Characters):
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 09:51:57 +0100 |
parents | 58e320bde005 |
children | 3fde0e346ad7 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
755 | 755 |
756 static int | 756 static int |
757 tab_char_width (struct window *w) | 757 tab_char_width (struct window *w) |
758 { | 758 { |
759 struct buffer *b = XBUFFER (w->buffer); | 759 struct buffer *b = XBUFFER (w->buffer); |
760 int char_tab_width = XINT (b->tab_width); | 760 int char_tab_width = XFIXNUM (b->tab_width); |
761 | 761 |
762 if (char_tab_width <= 0 || char_tab_width > 1000) char_tab_width = 8; | 762 if (char_tab_width <= 0 || char_tab_width > 1000) char_tab_width = 8; |
763 | 763 |
764 return char_tab_width; | 764 return char_tab_width; |
765 } | 765 } |
1952 data->new_descent = max (data->new_descent, descent); | 1952 data->new_descent = max (data->new_descent, descent); |
1953 } | 1953 } |
1954 | 1954 |
1955 /* A pixmap with an explicitly set baseline. We determine the | 1955 /* A pixmap with an explicitly set baseline. We determine the |
1956 contribution here. */ | 1956 contribution here. */ |
1957 else if (INTP (baseline)) | 1957 else if (FIXNUMP (baseline)) |
1958 { | 1958 { |
1959 int height = ascent + descent; | 1959 int height = ascent + descent; |
1960 int pix_ascent, pix_descent; | 1960 int pix_ascent, pix_descent; |
1961 | 1961 |
1962 pix_ascent = height * XINT (baseline) / 100; | 1962 pix_ascent = height * XFIXNUM (baseline) / 100; |
1963 pix_descent = height - pix_ascent; | 1963 pix_descent = height - pix_ascent; |
1964 | 1964 |
1965 data->new_ascent = max (data->new_ascent, pix_ascent); | 1965 data->new_ascent = max (data->new_ascent, pix_ascent); |
1966 data->new_descent = max (data->new_descent, pix_descent); | 1966 data->new_descent = max (data->new_descent, pix_descent); |
1967 data->max_pixmap_height = max (data->max_pixmap_height, height); | 1967 data->max_pixmap_height = max (data->max_pixmap_height, height); |
2145 | 2145 |
2146 /* If the buffer's value of selective_display is an integer then | 2146 /* If the buffer's value of selective_display is an integer then |
2147 only lines that start with less than selective_display columns of | 2147 only lines that start with less than selective_display columns of |
2148 space will be displayed. If selective_display is t then all text | 2148 space will be displayed. If selective_display is t then all text |
2149 after a ^M is invisible. */ | 2149 after a ^M is invisible. */ |
2150 int selective = (INTP (b->selective_display) | 2150 int selective = (FIXNUMP (b->selective_display) |
2151 ? XINT (b->selective_display) | 2151 ? XFIXNUM (b->selective_display) |
2152 : (!NILP (b->selective_display) ? -1 : 0)); | 2152 : (!NILP (b->selective_display) ? -1 : 0)); |
2153 | 2153 |
2154 /* The variable ctl-arrow allows the user to specify what characters | 2154 /* The variable ctl-arrow allows the user to specify what characters |
2155 can actually be displayed and which octal should be used for. | 2155 can actually be displayed and which octal should be used for. |
2156 #### This variable should probably have some rethought done to | 2156 #### This variable should probably have some rethought done to |
2931 | 2931 |
2932 dl->ascent = data.new_ascent; | 2932 dl->ascent = data.new_ascent; |
2933 dl->descent = data.new_descent; | 2933 dl->descent = data.new_descent; |
2934 | 2934 |
2935 { | 2935 { |
2936 unsigned short ascent = (unsigned short) XINT (w->minimum_line_ascent); | 2936 unsigned short ascent = (unsigned short) XFIXNUM (w->minimum_line_ascent); |
2937 | 2937 |
2938 if (dl->ascent < ascent) | 2938 if (dl->ascent < ascent) |
2939 dl->ascent = ascent; | 2939 dl->ascent = ascent; |
2940 } | 2940 } |
2941 { | 2941 { |
2942 unsigned short descent = (unsigned short) XINT (w->minimum_line_descent); | 2942 unsigned short descent = (unsigned short) XFIXNUM (w->minimum_line_descent); |
2943 | 2943 |
2944 if (dl->descent < descent) | 2944 if (dl->descent < descent) |
2945 dl->descent = descent; | 2945 dl->descent = descent; |
2946 } | 2946 } |
2947 | 2947 |
4346 { | 4346 { |
4347 elt = XCAR (elt); | 4347 elt = XCAR (elt); |
4348 goto tail_recurse; | 4348 goto tail_recurse; |
4349 } | 4349 } |
4350 } | 4350 } |
4351 else if (INTP (car)) | 4351 else if (FIXNUMP (car)) |
4352 { | 4352 { |
4353 Charcount lim = XINT (car); | 4353 Charcount lim = XFIXNUM (car); |
4354 | 4354 |
4355 elt = XCDR (elt); | 4355 elt = XCDR (elt); |
4356 | 4356 |
4357 if (lim < 0) | 4357 if (lim < 0) |
4358 { | 4358 { |
5178 | 5178 |
5179 dl->ascent = data.new_ascent; | 5179 dl->ascent = data.new_ascent; |
5180 dl->descent = data.new_descent; | 5180 dl->descent = data.new_descent; |
5181 | 5181 |
5182 { | 5182 { |
5183 unsigned short ascent = (unsigned short) XINT (w->minimum_line_ascent); | 5183 unsigned short ascent = (unsigned short) XFIXNUM (w->minimum_line_ascent); |
5184 | 5184 |
5185 if (dl->ascent < ascent) | 5185 if (dl->ascent < ascent) |
5186 dl->ascent = ascent; | 5186 dl->ascent = ascent; |
5187 } | 5187 } |
5188 { | 5188 { |
5189 unsigned short descent = (unsigned short) XINT (w->minimum_line_descent); | 5189 unsigned short descent = (unsigned short) XFIXNUM (w->minimum_line_descent); |
5190 | 5190 |
5191 if (dl->descent < descent) | 5191 if (dl->descent < descent) |
5192 dl->descent = descent; | 5192 dl->descent = descent; |
5193 } | 5193 } |
5194 | 5194 |
5204 buffer_or_string_bytexpos_to_charxpos (disp_string, | 5204 buffer_or_string_bytexpos_to_charxpos (disp_string, |
5205 data.byte_charpos) - 1; | 5205 data.byte_charpos) - 1; |
5206 if (truncate_win) | 5206 if (truncate_win) |
5207 data.dl->num_chars = | 5207 data.dl->num_chars = |
5208 string_column_at_point (disp_string, dl->end_charpos, | 5208 string_column_at_point (disp_string, dl->end_charpos, |
5209 b ? XINT (b->tab_width) : 8); | 5209 b ? XFIXNUM (b->tab_width) : 8); |
5210 else | 5210 else |
5211 /* This doesn't correctly take into account tabs and control | 5211 /* This doesn't correctly take into account tabs and control |
5212 characters but if the window isn't being truncated then this | 5212 characters but if the window isn't being truncated then this |
5213 value isn't going to end up being used anyhow. */ | 5213 value isn't going to end up being used anyhow. */ |
5214 data.dl->num_chars = dl->end_charpos - dl->charpos; | 5214 data.dl->num_chars = dl->end_charpos - dl->charpos; |
5491 reset_face_cachels (w); | 5491 reset_face_cachels (w); |
5492 if (!Dynarr_length (w->glyph_cachels)) | 5492 if (!Dynarr_length (w->glyph_cachels)) |
5493 reset_glyph_cachels (w); | 5493 reset_glyph_cachels (w); |
5494 #endif | 5494 #endif |
5495 | 5495 |
5496 Fset_marker (w->start[type], make_int (start_pos), w->buffer); | 5496 Fset_marker (w->start[type], make_fixnum (start_pos), w->buffer); |
5497 Fset_marker (w->pointm[type], make_int (point), w->buffer); | 5497 Fset_marker (w->pointm[type], make_fixnum (point), w->buffer); |
5498 w->last_point_x[type] = -1; | 5498 w->last_point_x[type] = -1; |
5499 w->last_point_y[type] = -1; | 5499 w->last_point_y[type] = -1; |
5500 | 5500 |
5501 /* Make sure a modeline is in the structs if needed. */ | 5501 /* Make sure a modeline is in the structs if needed. */ |
5502 need_modeline = ensure_modeline_generated (w, type); | 5502 need_modeline = ensure_modeline_generated (w, type); |
5734 /* If we don't have any buffer change recorded but the modiff flag has | 5734 /* If we don't have any buffer change recorded but the modiff flag has |
5735 been incremented, then fail. I'm not sure of the exact circumstances | 5735 been incremented, then fail. I'm not sure of the exact circumstances |
5736 under which this can happen, but I believe that it is probably a | 5736 under which this can happen, but I believe that it is probably a |
5737 reasonable happening. */ | 5737 reasonable happening. */ |
5738 if (!point_visible (w, pointm, CURRENT_DISP) | 5738 if (!point_visible (w, pointm, CURRENT_DISP) |
5739 || XINT (w->last_modified[CURRENT_DISP]) < BUF_MODIFF (b)) | 5739 || XFIXNUM (w->last_modified[CURRENT_DISP]) < BUF_MODIFF (b)) |
5740 return 0; | 5740 return 0; |
5741 | 5741 |
5742 /* If the cursor is moved we attempt to update it. If we succeed we | 5742 /* If the cursor is moved we attempt to update it. If we succeed we |
5743 go ahead and proceed with the optimization attempt. */ | 5743 go ahead and proceed with the optimization attempt. */ |
5744 if (!EQ (Fmarker_buffer (w->last_point[CURRENT_DISP]), w->buffer) | 5744 if (!EQ (Fmarker_buffer (w->last_point[CURRENT_DISP]), w->buffer) |
5815 region and the line's size and positioning don't change. | 5815 region and the line's size and positioning don't change. |
5816 Otherwise we fail. If we fail we will have altered the desired | 5816 Otherwise we fail. If we fail we will have altered the desired |
5817 structs which could lead to an assertion failure. However, if we | 5817 structs which could lead to an assertion failure. However, if we |
5818 fail the next thing that is going to happen is a full regen so we | 5818 fail the next thing that is going to happen is a full regen so we |
5819 will actually end up being safe. */ | 5819 will actually end up being safe. */ |
5820 w->last_modified[DESIRED_DISP] = make_int (BUF_MODIFF (b)); | 5820 w->last_modified[DESIRED_DISP] = make_fixnum (BUF_MODIFF (b)); |
5821 w->last_facechange[DESIRED_DISP] = make_int (BUF_FACECHANGE (b)); | 5821 w->last_facechange[DESIRED_DISP] = make_fixnum (BUF_FACECHANGE (b)); |
5822 Fset_marker (w->last_start[DESIRED_DISP], make_int (startp), w->buffer); | 5822 Fset_marker (w->last_start[DESIRED_DISP], make_fixnum (startp), w->buffer); |
5823 Fset_marker (w->last_point[DESIRED_DISP], make_int (pointm), w->buffer); | 5823 Fset_marker (w->last_point[DESIRED_DISP], make_fixnum (pointm), w->buffer); |
5824 | 5824 |
5825 first_line = last_line = line; | 5825 first_line = last_line = line; |
5826 while (line <= dla_end) | 5826 while (line <= dla_end) |
5827 { | 5827 { |
5828 Charbpos old_start, old_end; | 5828 Charbpos old_start, old_end; |
6027 | 6027 |
6028 /* If the changed area also ends on this line, then we may be in | 6028 /* If the changed area also ends on this line, then we may be in |
6029 business. Update everything and return success. */ | 6029 business. Update everything and return success. */ |
6030 if (end_unchanged >= ddl->charpos && end_unchanged <= ddl->end_charpos) | 6030 if (end_unchanged >= ddl->charpos && end_unchanged <= ddl->end_charpos) |
6031 { | 6031 { |
6032 w->last_modified[DESIRED_DISP] = make_int (BUF_MODIFF (b)); | 6032 w->last_modified[DESIRED_DISP] = make_fixnum (BUF_MODIFF (b)); |
6033 w->last_facechange[DESIRED_DISP] = make_int (BUF_FACECHANGE (b)); | 6033 w->last_facechange[DESIRED_DISP] = make_fixnum (BUF_FACECHANGE (b)); |
6034 Fset_marker (w->last_start[DESIRED_DISP], make_int (startp), | 6034 Fset_marker (w->last_start[DESIRED_DISP], make_fixnum (startp), |
6035 w->buffer); | 6035 w->buffer); |
6036 Fset_marker (w->last_point[DESIRED_DISP], make_int (pointm), | 6036 Fset_marker (w->last_point[DESIRED_DISP], make_fixnum (pointm), |
6037 w->buffer); | 6037 w->buffer); |
6038 | 6038 |
6039 if (ddl->cursor_elt != -1) | 6039 if (ddl->cursor_elt != -1) |
6040 { | 6040 { |
6041 w->last_point_x[DESIRED_DISP] = ddl->cursor_elt; | 6041 w->last_point_x[DESIRED_DISP] = ddl->cursor_elt; |
6099 window height can be calculated correctly. */ | 6099 window height can be calculated correctly. */ |
6100 ensure_modeline_generated (w, type); | 6100 ensure_modeline_generated (w, type); |
6101 | 6101 |
6102 startp = start_with_line_at_pixpos (w, point, window_half_pixpos (w)); | 6102 startp = start_with_line_at_pixpos (w, point, window_half_pixpos (w)); |
6103 regenerate_window (w, startp, point, type); | 6103 regenerate_window (w, startp, point, type); |
6104 Fset_marker (w->start[type], make_int (startp), w->buffer); | 6104 Fset_marker (w->start[type], make_fixnum (startp), w->buffer); |
6105 | 6105 |
6106 return startp; | 6106 return startp; |
6107 } | 6107 } |
6108 | 6108 |
6109 /* Given a window and a set of display lines, return a boolean | 6109 /* Given a window and a set of display lines, return a boolean |
6298 pointm = BUF_BEGV (b); | 6298 pointm = BUF_BEGV (b); |
6299 else if (pointm > BUF_ZV (b)) | 6299 else if (pointm > BUF_ZV (b)) |
6300 pointm = BUF_ZV (b); | 6300 pointm = BUF_ZV (b); |
6301 } | 6301 } |
6302 } | 6302 } |
6303 Fset_marker (w->pointm[DESIRED_DISP], make_int (pointm), the_buffer); | 6303 Fset_marker (w->pointm[DESIRED_DISP], make_fixnum (pointm), the_buffer); |
6304 | 6304 |
6305 /* Added 2-1-10 -- we should never have empty face or glyph cachels | 6305 /* Added 2-1-10 -- we should never have empty face or glyph cachels |
6306 because we initialized them at startup and the only way to reduce | 6306 because we initialized them at startup and the only way to reduce |
6307 their number is through calling reset_face_cachels() or | 6307 their number is through calling reset_face_cachels() or |
6308 reset_glyph_cachels(), which as a side effect sets up a number of | 6308 reset_glyph_cachels(), which as a side effect sets up a number of |
6358 if (startp < BUF_BEGV (b)) | 6358 if (startp < BUF_BEGV (b)) |
6359 startp = BUF_BEGV (b); | 6359 startp = BUF_BEGV (b); |
6360 else if (startp > BUF_ZV (b)) | 6360 else if (startp > BUF_ZV (b)) |
6361 startp = BUF_ZV (b); | 6361 startp = BUF_ZV (b); |
6362 } | 6362 } |
6363 Fset_marker (w->start[DESIRED_DISP], make_int (startp), the_buffer); | 6363 Fset_marker (w->start[DESIRED_DISP], make_fixnum (startp), the_buffer); |
6364 | 6364 |
6365 truncation_changed = (find_window_mirror (w)->truncate_win != | 6365 truncation_changed = (find_window_mirror (w)->truncate_win != |
6366 (unsigned int) window_truncation_on (w)); | 6366 (unsigned int) window_truncation_on (w)); |
6367 | 6367 |
6368 /* If w->force_start is set, then some function set w->start and we | 6368 /* If w->force_start is set, then some function set w->start and we |
6381 pointm = point_at_center (w, DESIRED_DISP, 0, 0); | 6381 pointm = point_at_center (w, DESIRED_DISP, 0, 0); |
6382 | 6382 |
6383 if (selected_globally) | 6383 if (selected_globally) |
6384 BUF_SET_PT (b, pointm); | 6384 BUF_SET_PT (b, pointm); |
6385 | 6385 |
6386 Fset_marker (w->pointm[DESIRED_DISP], make_int (pointm), | 6386 Fset_marker (w->pointm[DESIRED_DISP], make_fixnum (pointm), |
6387 the_buffer); | 6387 the_buffer); |
6388 | 6388 |
6389 /* #### BUFU amounts of overkill just to get the cursor | 6389 /* #### BUFU amounts of overkill just to get the cursor |
6390 location marked properly. FIX ME FIX ME FIX ME */ | 6390 location marked properly. FIX ME FIX ME FIX ME */ |
6391 regenerate_window (w, startp, pointm, DESIRED_DISP); | 6391 regenerate_window (w, startp, pointm, DESIRED_DISP); |
6394 goto regeneration_done; | 6394 goto regeneration_done; |
6395 } | 6395 } |
6396 | 6396 |
6397 /* If nothing has changed since the last redisplay, then we just | 6397 /* If nothing has changed since the last redisplay, then we just |
6398 need to make sure that point is still visible. */ | 6398 need to make sure that point is still visible. */ |
6399 if (XINT (w->last_modified[CURRENT_DISP]) >= BUF_MODIFF (b) | 6399 if (XFIXNUM (w->last_modified[CURRENT_DISP]) >= BUF_MODIFF (b) |
6400 && XINT (w->last_facechange[CURRENT_DISP]) >= BUF_FACECHANGE (b) | 6400 && XFIXNUM (w->last_facechange[CURRENT_DISP]) >= BUF_FACECHANGE (b) |
6401 && pointm >= startp | 6401 && pointm >= startp |
6402 /* This check is to make sure we restore the minibuffer after a | 6402 /* This check is to make sure we restore the minibuffer after a |
6403 temporary change to the echo area. */ | 6403 temporary change to the echo area. */ |
6404 && !(MINI_WINDOW_P (w) && f->buffers_changed) | 6404 && !(MINI_WINDOW_P (w) && f->buffers_changed) |
6405 && !f->frame_changed | 6405 && !f->frame_changed |
6505 && !truncation_changed | 6505 && !truncation_changed |
6506 && pointm >= startp | 6506 && pointm >= startp |
6507 && regenerate_window_incrementally (w, startp, pointm)) | 6507 && regenerate_window_incrementally (w, startp, pointm)) |
6508 { | 6508 { |
6509 if (f->modeline_changed | 6509 if (f->modeline_changed |
6510 || XINT (w->last_modified[CURRENT_DISP]) < BUF_MODIFF (b) | 6510 || XFIXNUM (w->last_modified[CURRENT_DISP]) < BUF_MODIFF (b) |
6511 || XINT (w->last_facechange[CURRENT_DISP]) < BUF_FACECHANGE (b)) | 6511 || XFIXNUM (w->last_facechange[CURRENT_DISP]) < BUF_FACECHANGE (b)) |
6512 regenerate_modeline (w); | 6512 regenerate_modeline (w); |
6513 | 6513 |
6514 skip_output = 1; | 6514 skip_output = 1; |
6515 goto regeneration_done; | 6515 goto regeneration_done; |
6516 } | 6516 } |
6560 /* Must do this before calling redisplay_output_window because it | 6560 /* Must do this before calling redisplay_output_window because it |
6561 sets some markers on the window. */ | 6561 sets some markers on the window. */ |
6562 if (echo_active) | 6562 if (echo_active) |
6563 { | 6563 { |
6564 w->buffer = old_buffer; | 6564 w->buffer = old_buffer; |
6565 Fset_marker (w->pointm[DESIRED_DISP], make_int (old_pointm), old_buffer); | 6565 Fset_marker (w->pointm[DESIRED_DISP], make_fixnum (old_pointm), old_buffer); |
6566 Fset_marker (w->start[DESIRED_DISP], make_int (old_startp), old_buffer); | 6566 Fset_marker (w->start[DESIRED_DISP], make_fixnum (old_startp), old_buffer); |
6567 } | 6567 } |
6568 | 6568 |
6569 /* These also have to be set before calling redisplay_output_window | 6569 /* These also have to be set before calling redisplay_output_window |
6570 since it sets the CURRENT_DISP values based on them. */ | 6570 since it sets the CURRENT_DISP values based on them. */ |
6571 w->last_modified[DESIRED_DISP] = make_int (BUF_MODIFF (b)); | 6571 w->last_modified[DESIRED_DISP] = make_fixnum (BUF_MODIFF (b)); |
6572 w->last_facechange[DESIRED_DISP] = make_int (BUF_FACECHANGE (b)); | 6572 w->last_facechange[DESIRED_DISP] = make_fixnum (BUF_FACECHANGE (b)); |
6573 Fset_marker (w->last_start[DESIRED_DISP], make_int (startp), w->buffer); | 6573 Fset_marker (w->last_start[DESIRED_DISP], make_fixnum (startp), w->buffer); |
6574 Fset_marker (w->last_point[DESIRED_DISP], make_int (pointm), w->buffer); | 6574 Fset_marker (w->last_point[DESIRED_DISP], make_fixnum (pointm), w->buffer); |
6575 | 6575 |
6576 if (!skip_output) | 6576 if (!skip_output) |
6577 { | 6577 { |
6578 Charbpos start = marker_position (w->start[DESIRED_DISP]); | 6578 Charbpos start = marker_position (w->start[DESIRED_DISP]); |
6579 Charbpos end = (w->window_end_pos[DESIRED_DISP] == -1 | 6579 Charbpos end = (w->window_end_pos[DESIRED_DISP] == -1 |
6587 * If we just displayed the echo area, the line start cache is | 6587 * If we just displayed the echo area, the line start cache is |
6588 * no longer valid, because the minibuffer window is associated | 6588 * no longer valid, because the minibuffer window is associated |
6589 * with the window now. | 6589 * with the window now. |
6590 */ | 6590 */ |
6591 if (echo_active) | 6591 if (echo_active) |
6592 w->line_cache_last_updated = make_int (-1); | 6592 w->line_cache_last_updated = make_fixnum (-1); |
6593 } | 6593 } |
6594 | 6594 |
6595 /* #### This should be dependent on face changes and will need to be | 6595 /* #### This should be dependent on face changes and will need to be |
6596 somewhere else once tty updates occur on a per-frame basis. */ | 6596 somewhere else once tty updates occur on a per-frame basis. */ |
6597 mark_face_cachels_as_clean (w); | 6597 mark_face_cachels_as_clean (w); |
7753 Since it is an unlikely that f->extents being changed | 7753 Since it is an unlikely that f->extents being changed |
7754 indicates that the cache really needs to be updated and if it | 7754 indicates that the cache really needs to be updated and if it |
7755 does redisplay will catch it pretty quickly we no longer | 7755 does redisplay will catch it pretty quickly we no longer |
7756 invalidate the cache if it is set. This greatly speeds up | 7756 invalidate the cache if it is set. This greatly speeds up |
7757 dragging out regions with the mouse. */ | 7757 dragging out regions with the mouse. */ |
7758 if (XINT (w->line_cache_last_updated) < BUF_MODIFF (b) | 7758 if (XFIXNUM (w->line_cache_last_updated) < BUF_MODIFF (b) |
7759 || f->faces_changed | 7759 || f->faces_changed |
7760 || f->clip_changed) | 7760 || f->clip_changed) |
7761 { | 7761 { |
7762 Dynarr_reset (w->line_start_cache); | 7762 Dynarr_reset (w->line_start_cache); |
7763 } | 7763 } |
8411 else | 8411 else |
8412 { | 8412 { |
8413 low_bound = high_bound = -1; | 8413 low_bound = high_bound = -1; |
8414 } | 8414 } |
8415 | 8415 |
8416 w->line_cache_last_updated = make_int (BUF_MODIFF (b)); | 8416 w->line_cache_last_updated = make_fixnum (BUF_MODIFF (b)); |
8417 | 8417 |
8418 /* This could be integrated into the next two sections, but it is easier | 8418 /* This could be integrated into the next two sections, but it is easier |
8419 to follow what's going on by having it separate. */ | 8419 to follow what's going on by having it separate. */ |
8420 if (no_regen) | 8420 if (no_regen) |
8421 { | 8421 { |