emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108790: * window.h (struct window):


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108790: * window.h (struct window): Change type of 'hscroll',
Date: Thu, 28 Jun 2012 16:29:37 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108790
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-06-28 16:29:37 +0400
message:
  * window.h (struct window): Change type of 'hscroll',
  'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
  'last_modified' and 'last_overlay_modified' to EMACS_INT.
  Adjust users accordingly.
  * xdisp.c (try_cursor_movement): Replace type check with eassert.
  * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
  from EMACS_INT to ptrdiff_t.
  (make_window): Omit redundant initialization.
modified:
  src/ChangeLog
  src/frame.c
  src/indent.c
  src/minibuf.c
  src/window.c
  src/window.h
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-06-28 11:37:27 +0000
+++ b/src/ChangeLog     2012-06-28 12:29:37 +0000
@@ -1,3 +1,14 @@
+2012-06-28  Dmitry Antipov  <address@hidden>
+
+       * window.h (struct window): Change type of 'hscroll',
+       'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
+       'last_modified' and 'last_overlay_modified' to EMACS_INT.
+       Adjust users accordingly.
+       * xdisp.c (try_cursor_movement): Replace type check with eassert.
+       * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
+       from EMACS_INT to ptrdiff_t.
+       (make_window): Omit redundant initialization.
+
 2012-06-28  Juanma Barranquero  <address@hidden>
 
        * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.

=== modified file 'src/frame.c'
--- a/src/frame.c       2012-06-28 11:11:48 +0000
+++ b/src/frame.c       2012-06-28 12:29:37 +0000
@@ -131,7 +131,7 @@
 {
   struct window *w = XWINDOW (window);
 
-  XSETFASTINT (w->last_modified, 0);
+  w->last_modified = 0;
   XSETFASTINT (w->top_line, XFASTINT (w->top_line) + n);
   XSETFASTINT (w->total_lines, XFASTINT (w->total_lines) - n);
 

=== modified file 'src/indent.c'
--- a/src/indent.c      2012-06-16 12:24:15 +0000
+++ b/src/indent.c      2012-06-28 12:29:37 +0000
@@ -1817,7 +1817,7 @@
 struct position *
 vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
 {
-  ptrdiff_t hscroll = XINT (w->hscroll);
+  ptrdiff_t hscroll = w->hscroll;
   struct position pos;
   /* vpos is cumulative vertical position, changed as from is changed */
   register EMACS_INT vpos = 0;

=== modified file 'src/minibuf.c'
--- a/src/minibuf.c     2012-06-19 17:05:41 +0000
+++ b/src/minibuf.c     2012-06-28 12:29:37 +0000
@@ -622,7 +622,7 @@
   /* Display this minibuffer in the proper window.  */
   Fset_window_buffer (minibuf_window, Fcurrent_buffer (), Qnil);
   Fselect_window (minibuf_window, Qnil);
-  XSETFASTINT (XWINDOW (minibuf_window)->hscroll, 0);
+  XWINDOW (minibuf_window)->hscroll = 0;
 
   Fmake_local_variable (Qprint_escape_newlines);
   print_escape_newlines = 1;
@@ -888,8 +888,8 @@
 
   /* Make sure minibuffer window is erased, not ignored.  */
   windows_or_buffers_changed++;
-  XSETFASTINT (XWINDOW (window)->last_modified, 0);
-  XSETFASTINT (XWINDOW (window)->last_overlay_modified, 0);
+  XWINDOW (window)->last_modified = 0;
+  XWINDOW (window)->last_overlay_modified = 0;
 
   /* In case the previous minibuffer displayed in this miniwindow is
      dead, we may keep displaying this buffer (tho it's inactive), so reset it,

=== modified file 'src/window.c'
--- a/src/window.c      2012-06-28 11:11:48 +0000
+++ b/src/window.c      2012-06-28 12:29:37 +0000
@@ -667,7 +667,7 @@
 WINDOW must be a live window and defaults to the selected one.  */)
   (Lisp_Object window)
 {
-  return decode_window (window)->hscroll;
+  return make_number (decode_window (window)->hscroll);
 }
 
 DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0,
@@ -686,10 +686,10 @@
   hscroll = clip_to_bounds (0, XINT (ncol), PTRDIFF_MAX);
 
   /* Prevent redisplay shortcuts when changing the hscroll.  */
-  if (XINT (w->hscroll) != hscroll)
+  if (w->hscroll != hscroll)
     XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
 
-  w->hscroll = make_number (hscroll);
+  w->hscroll = hscroll;
   return ncol;
 }
 
@@ -1313,8 +1313,8 @@
 
   if (! NILP (update)
       && ! (! NILP (w->window_end_valid)
-           && XFASTINT (w->last_modified) >= BUF_MODIFF (b)
-           && XFASTINT (w->last_overlay_modified) >= BUF_OVERLAY_MODIFF (b))
+           && w->last_modified >= BUF_MODIFF (b)
+           && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b))
       && !noninteractive)
     {
       struct text_pos startp;
@@ -1397,8 +1397,8 @@
   if (NILP (noforce))
     w->force_start = 1;
   w->update_mode_line = 1;
-  XSETFASTINT (w->last_modified, 0);
-  XSETFASTINT (w->last_overlay_modified, 0);
+  w->last_modified = 0;
+  w->last_overlay_modified = 0;
   if (!EQ (window, selected_window))
     windows_or_buffers_changed++;
 
@@ -1510,8 +1510,8 @@
   if (NILP (w->window_end_valid)
       || current_buffer->clip_changed
       || current_buffer->prevent_redisplay_optimizations_p
-      || XFASTINT (w->last_modified) < BUF_MODIFF (b)
-      || XFASTINT (w->last_overlay_modified) < BUF_OVERLAY_MODIFF (b))
+      || w->last_modified < BUF_MODIFF (b)
+      || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b))
     return Qnil;
 
   if (NILP (line))
@@ -3002,7 +3002,7 @@
         Resetting hscroll and vscroll here is problematic for things like
         image-mode and doc-view-mode since it resets the image's position
         whenever we resize the frame.  */
-      w->hscroll = w->min_hscroll = make_number (0);
+      w->hscroll = w->min_hscroll = 0;
       w->vscroll = 0;
       set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
       set_marker_restricted (w->start,
@@ -3010,8 +3010,8 @@
                             buffer);
       w->start_at_line_beg = 0;
       w->force_start = 0;
-      XSETFASTINT (w->last_modified, 0);
-      XSETFASTINT (w->last_overlay_modified, 0);
+      w->last_modified = 0;
+      w->last_overlay_modified = 0;
     }
   /* Maybe we could move this into the `if' but it's not obviously safe and
      I doubt it's worth the trouble.  */
@@ -3196,8 +3196,8 @@
        Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
       Vminibuf_scroll_window = window;
       w = XWINDOW (window);
-      XSETFASTINT (w->hscroll, 0);
-      XSETFASTINT (w->min_hscroll, 0);
+      w->hscroll = 0;
+      w->min_hscroll = 0;
       set_marker_restricted_both (w->start, buf, BEG, BEG);
       set_marker_restricted_both (w->pointm, buf, BEG, BEG);
 
@@ -3286,9 +3286,6 @@
   XSETFASTINT (w->new_normal, 0);
   w->start = Fmake_marker ();
   w->pointm = Fmake_marker ();
-  XSETFASTINT (w->hscroll, 0);
-  XSETFASTINT (w->min_hscroll, 0);
-  XSETFASTINT (w->last_point, 0);
   w->vertical_scroll_bar_type = Qt;
   XSETFASTINT (w->window_end_pos, 0);
   XSETFASTINT (w->window_end_vpos, 0);
@@ -3488,8 +3485,8 @@
     }
 
   /* Clear out some redisplay caches.  */
-  XSETFASTINT (w->last_modified, 0);
-  XSETFASTINT (w->last_overlay_modified, 0);
+  w->last_modified = 0;
+  w->last_overlay_modified = 0;
 }
 
 
@@ -4021,8 +4018,8 @@
       /* Grow the mini-window.  */
       XSETFASTINT (w->top_line, XFASTINT (r->top_line) + XFASTINT 
(r->total_lines));
       XSETFASTINT (w->total_lines, XFASTINT (w->total_lines) - XINT (value));
-      XSETFASTINT (w->last_modified, 0);
-      XSETFASTINT (w->last_overlay_modified, 0);
+      w->last_modified = 0;
+      w->last_overlay_modified = 0;
 
       adjust_glyphs (f);
       UNBLOCK_INPUT;
@@ -4057,8 +4054,8 @@
          XSETFASTINT (w->top_line, XFASTINT (r->top_line) + XFASTINT 
(r->total_lines));
          XSETFASTINT (w->total_lines, 1);
 
-         XSETFASTINT (w->last_modified, 0);
-         XSETFASTINT (w->last_overlay_modified, 0);
+         w->last_modified = 0;
+         w->last_overlay_modified = 0;
 
          adjust_glyphs (f);
          UNBLOCK_INPUT;
@@ -4285,8 +4282,8 @@
                                         w->buffer);
                  w->start_at_line_beg = 1;
                  w->update_mode_line = 1;
-                 XSETFASTINT (w->last_modified, 0);
-                 XSETFASTINT (w->last_overlay_modified, 0);
+                 w->last_modified = 0;
+                 w->last_overlay_modified = 0;
                  /* Set force_start so that redisplay_window will run the
                     window-scroll-functions.  */
                  w->force_start = 1;
@@ -4431,8 +4428,8 @@
       bytepos = XMARKER (w->start)->bytepos;
       w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n');
       w->update_mode_line = 1;
-      XSETFASTINT (w->last_modified, 0);
-      XSETFASTINT (w->last_overlay_modified, 0);
+      w->last_modified = 0;
+      w->last_overlay_modified = 0;
       /* Set force_start so that redisplay_window will run the
         window-scroll-functions.  */
       w->force_start = 1;
@@ -4585,10 +4582,10 @@
          struct position posit
            = *compute_motion (startpos, 0, 0, 0,
                               PT, ht, 0,
-                              -1, XINT (w->hscroll),
+                              -1, w->hscroll,
                               0, w);
          window_scroll_preserve_vpos = posit.vpos;
-         window_scroll_preserve_hpos = posit.hpos + XINT (w->hscroll);
+         window_scroll_preserve_hpos = posit.hpos + w->hscroll;
        }
 
       original_pos = Fcons (make_number (window_scroll_preserve_hpos),
@@ -4630,8 +4627,8 @@
       set_marker_restricted_both (w->start, w->buffer, pos, pos_byte);
       w->start_at_line_beg = !NILP (bolp);
       w->update_mode_line = 1;
-      XSETFASTINT (w->last_modified, 0);
-      XSETFASTINT (w->last_overlay_modified, 0);
+      w->last_modified = 0;
+      w->last_overlay_modified = 0;
       /* Set force_start so that redisplay_window will run
         the window-scroll-functions.  */
       w->force_start = 1;
@@ -4872,7 +4869,7 @@
   (register Lisp_Object arg, Lisp_Object set_minimum)
 {
   Lisp_Object result;
-  EMACS_INT hscroll;
+  ptrdiff_t hscroll;
   struct window *w = XWINDOW (selected_window);
 
   if (NILP (arg))
@@ -4880,7 +4877,7 @@
   else
     arg = Fprefix_numeric_value (arg);
 
-  hscroll = XINT (w->hscroll) + XINT (arg);
+  hscroll = w->hscroll + XINT (arg);
   result = Fset_window_hscroll (selected_window, make_number (hscroll));
 
   if (!NILP (set_minimum))
@@ -4901,7 +4898,7 @@
   (register Lisp_Object arg, Lisp_Object set_minimum)
 {
   Lisp_Object result;
-  EMACS_INT hscroll;
+  ptrdiff_t hscroll;
   struct window *w = XWINDOW (selected_window);
 
   if (NILP (arg))
@@ -4909,7 +4906,7 @@
   else
     arg = Fprefix_numeric_value (arg);
 
-  hscroll = XINT (w->hscroll) - XINT (arg);
+  hscroll = w->hscroll - XINT (arg);
   result = Fset_window_hscroll (selected_window, make_number (hscroll));
 
   if (!NILP (set_minimum))
@@ -5537,8 +5534,8 @@
          w->total_lines = p->total_lines;
          w->normal_cols = p->normal_cols;
          w->normal_lines = p->normal_lines;
-         w->hscroll = p->hscroll;
-         w->min_hscroll = p->min_hscroll;
+         w->hscroll = XFASTINT (p->hscroll);
+         w->min_hscroll = XFASTINT (p->min_hscroll);
          w->display_table = p->display_table;
          w->left_margin_cols = p->left_margin_cols;
          w->right_margin_cols = p->right_margin_cols;
@@ -5571,8 +5568,8 @@
                }
            }
 
-         XSETFASTINT (w->last_modified, 0);
-         XSETFASTINT (w->last_overlay_modified, 0);
+         w->last_modified = 0;
+         w->last_overlay_modified = 0;
 
          /* Reinstall the saved buffer and pointers into it.  */
          if (NILP (p->buffer))
@@ -5811,7 +5808,7 @@
   if (!row->enabled_p)
     return NULL;
 
-  if (XINT (w->hscroll))
+  if (w->hscroll)
     {
       /* When the window is hscrolled, cursor hpos can legitimately be
         out of bounds, but we draw the cursor at the corresponding
@@ -5853,8 +5850,8 @@
       p->total_lines = w->total_lines;
       p->normal_cols = w->normal_cols;
       p->normal_lines = w->normal_lines;
-      p->hscroll = w->hscroll;
-      p->min_hscroll = w->min_hscroll;
+      XSETFASTINT (p->hscroll, w->hscroll);
+      XSETFASTINT (p->min_hscroll, w->min_hscroll);
       p->display_table = w->display_table;
       p->left_margin_cols = w->left_margin_cols;
       p->right_margin_cols = w->right_margin_cols;

=== modified file 'src/window.h'
--- a/src/window.h      2012-06-28 11:11:48 +0000
+++ b/src/window.h      2012-06-28 12:29:37 +0000
@@ -141,24 +141,10 @@
        each one can have its own value of point.  */
     Lisp_Object pointm;
 
-    /* Number of columns display within the window is scrolled to the left.  */
-    Lisp_Object hscroll;
-    /* Minimum hscroll for automatic hscrolling.  This is the value
-       the user has set, by set-window-hscroll for example.  */
-    Lisp_Object min_hscroll;
-
     /* No permanent meaning; used by save-window-excursion's
        bookkeeping.  */
     Lisp_Object temslot;
 
-    /* text.modified of displayed buffer as of last time display
-       completed.  */
-    Lisp_Object last_modified;
-    /* BUF_OVERLAY_MODIFIED of displayed buffer as of last complete update.  */
-    Lisp_Object last_overlay_modified;
-    /* Value of point at that time.  */
-    Lisp_Object last_point;
-
     /* This window's vertical scroll bar.  This field is only for use
        by the window-system-dependent code which implements the
        scroll bars; it can store anything it likes here.  If this
@@ -254,6 +240,25 @@
     /* Unique number of window assigned when it was created.  */
     int sequence_number;
 
+    /* Number of columns display within the window is scrolled to the left.  */
+    ptrdiff_t hscroll;
+
+    /* Minimum hscroll for automatic hscrolling.  This is the value
+       the user has set, by set-window-hscroll for example.  */
+    ptrdiff_t min_hscroll;
+
+    /* Displayed buffer's text modification events counter as of last time
+       display completed.  */
+    EMACS_INT last_modified;
+
+    /* Displayed buffer's overlays modification events counter as of last
+       complete update.  */
+    EMACS_INT last_overlay_modified;
+
+    /* Value of point at that time.  Since this is a position in a buffer,
+       it should be positive. */
+    ptrdiff_t last_point;
+
     /* Scaling factor for the glyph_matrix size calculation in this window.
        Used if window contains many small images or uses proportional fonts,
        as the normal  may yield a matrix which is too small.  */

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-06-28 07:50:50 +0000
+++ b/src/xdisp.c       2012-06-28 12:29:37 +0000
@@ -1562,8 +1562,8 @@
 
   current_header_line_height = current_mode_line_height = -1;
 
-  if (visible_p && XFASTINT (w->hscroll) > 0)
-    *x -= XFASTINT (w->hscroll) * WINDOW_FRAME_COLUMN_WIDTH (w);
+  if (visible_p && w->hscroll > 0)
+    *x -= w->hscroll * WINDOW_FRAME_COLUMN_WIDTH (w);
 
 #if 0
   /* Debugging code.  */
@@ -2697,7 +2697,7 @@
 
   /* Are lines in the display truncated?  */
   if (base_face_id != DEFAULT_FACE_ID
-      || XINT (it->w->hscroll)
+      || it->w->hscroll
       || (! WINDOW_FULL_WIDTH_P (it->w)
          && ((!NILP (Vtruncate_partial_width_windows)
               && !INTEGERP (Vtruncate_partial_width_windows))
@@ -2760,7 +2760,7 @@
   else
     {
       it->first_visible_x
-       = XFASTINT (it->w->hscroll) * FRAME_COLUMN_WIDTH (it->f);
+       = it->w->hscroll * FRAME_COLUMN_WIDTH (it->f);
       it->last_visible_x = (it->first_visible_x
                            + window_box_width (w, TEXT_AREA));
 
@@ -12309,7 +12309,7 @@
                 inside the left margin and the window is already
                 hscrolled. */
              && ((!row_r2l_p
-                  && ((XFASTINT (w->hscroll)
+                  && ((w->hscroll
                        && w->cursor.x <= h_margin)
                       || (cursor_row->enabled_p
                           && cursor_row->truncated_on_right_p
@@ -12327,7 +12327,7 @@
                              are actually truncated on the left. */
                           && cursor_row->truncated_on_right_p
                           && w->cursor.x <= h_margin)
-                         || (XFASTINT (w->hscroll)
+                         || (w->hscroll
                              && (w->cursor.x >= text_area_width - 
h_margin))))))
            {
              struct it it;
@@ -12388,15 +12388,15 @@
                  hscroll
                    = max (0, it.current_x - wanted_x) / FRAME_COLUMN_WIDTH 
(it.f);
                }
-             hscroll = max (hscroll, XFASTINT (w->min_hscroll));
+             hscroll = max (hscroll, w->min_hscroll);
 
              /* Don't prevent redisplay optimizations if hscroll
                 hasn't changed, as it will unnecessarily slow down
                 redisplay.  */
-             if (XFASTINT (w->hscroll) != hscroll)
+             if (w->hscroll != hscroll)
                {
                  XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
-                 w->hscroll = make_number (hscroll);
+                 w->hscroll = hscroll;
                  hscrolled_p = 1;
                }
            }
@@ -12508,8 +12508,8 @@
   int unchanged_p = 1;
 
   /* If text or overlays have changed, see where.  */
-  if (XFASTINT (w->last_modified) < MODIFF
-      || XFASTINT (w->last_overlay_modified) < OVERLAY_MODIFF)
+  if (w->last_modified < MODIFF
+      || w->last_overlay_modified < OVERLAY_MODIFF)
     {
       /* Gap in the line?  */
       if (GPT < start || Z - GPT < end)
@@ -12788,9 +12788,9 @@
        pt = marker_position (w->pointm);
 
       if ((w->current_matrix->buffer != XBUFFER (w->buffer)
-          || pt != XINT (w->last_point))
+          || pt != w->last_point)
          && check_point_in_composition (w->current_matrix->buffer,
-                                        XINT (w->last_point),
+                                        w->last_point,
                                         XBUFFER (w->buffer), pt))
        b->clip_changed = 1;
     }
@@ -13012,9 +13012,9 @@
   if (!NILP (w->column_number_displayed)
       /* This alternative quickly identifies a common case
         where no change is needed.  */
-      && !(PT == XFASTINT (w->last_point)
-          && XFASTINT (w->last_modified) >= MODIFF
-          && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
+      && !(PT == w->last_point
+          && w->last_modified >= MODIFF
+          && w->last_overlay_modified >= OVERLAY_MODIFF)
       && (XFASTINT (w->column_number_displayed) != current_column ()))
     w->update_mode_line = 1;
 
@@ -13077,8 +13077,8 @@
     }
   else if (EQ (selected_window, minibuf_window)
           && (current_buffer->clip_changed
-              || XFASTINT (w->last_modified) < MODIFF
-              || XFASTINT (w->last_overlay_modified) < OVERLAY_MODIFF)
+              || w->last_modified < MODIFF
+              || w->last_overlay_modified < OVERLAY_MODIFF)
           && resize_mini_window (w, 0))
     {
       /* Resized active mini-window to fit the size of what it is
@@ -13143,8 +13143,8 @@
              || FETCH_BYTE (BYTEPOS (tlbufpos)) == '\n'))
        /* Former continuation line has disappeared by becoming empty.  */
        goto cancel;
-      else if (XFASTINT (w->last_modified) < MODIFF
-              || XFASTINT (w->last_overlay_modified) < OVERLAY_MODIFF
+      else if (w->last_modified < MODIFF
+              || w->last_overlay_modified < OVERLAY_MODIFF
               || MINI_WINDOW_P (w))
        {
          /* We have to handle the case of continuation around a
@@ -13248,7 +13248,7 @@
            goto cancel;
        }
       else if (/* Cursor position hasn't changed.  */
-              PT == XFASTINT (w->last_point)
+              PT == w->last_point
               /* Make sure the cursor was last displayed
                  in this window.  Otherwise we have to reposition it.  */
               && 0 <= w->cursor.vpos
@@ -13664,10 +13664,8 @@
     {
       struct buffer *b = XBUFFER (w->buffer);
 
-      w->last_modified
-       = make_number (accurate_p ? BUF_MODIFF (b) : 0);
-      w->last_overlay_modified
-       = make_number (accurate_p ? BUF_OVERLAY_MODIFF (b) : 0);
+      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);
 
@@ -13689,9 +13687,9 @@
          w->last_cursor_off_p = w->cursor_off_p;
 
          if (w == XWINDOW (selected_window))
-           w->last_point = make_number (BUF_PT (b));
+           w->last_point = BUF_PT (b);
          else
-           w->last_point = make_number (XMARKER (w->pointm)->charpos);
+           w->last_point = XMARKER (w->pointm)->charpos;
        }
     }
 
@@ -14932,6 +14930,11 @@
     return rc;
 #endif
 
+  /* Previously, there was a check for Lisp integer in the 
+     if-statement below. Now, this field is converted to
+     ptrdiff_t, thus zero means invalid position in a buffer.  */
+  eassert (w->last_point > 0);
+
   /* Handle case where text has not changed, only point, and it has
      not moved off the frame.  */
   if (/* Point may be in this window.  */
@@ -14952,8 +14955,6 @@
           && !NILP (BVAR (current_buffer, mark_active)))
       && NILP (w->region_showing)
       && NILP (Vshow_trailing_whitespace)
-      /* Right after splitting windows, last_point may be nil.  */
-      && INTEGERP (w->last_point)
       /* This code is not used for mini-buffer for the sake of the case
         of redisplaying to replace an echo area message; since in
         that case the mini-buffer contents per se are usually
@@ -15011,7 +15012,7 @@
          int scroll_p = 0, must_scroll = 0;
          int last_y = window_text_bottom_y (w) - this_scroll_margin;
 
-         if (PT > XFASTINT (w->last_point))
+         if (PT > w->last_point)
            {
              /* Point has moved forward.  */
              while (MATRIX_ROW_END_CHARPOS (row) < PT
@@ -15046,7 +15047,7 @@
                      && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)))
                scroll_p = 1;
            }
-         else if (PT < XFASTINT (w->last_point))
+         else if (PT < w->last_point)
            {
              /* Cursor has to be moved backward.  Note that PT >=
                 CHARPOS (startp) because of the outer if-statement.  */
@@ -15392,8 +15393,8 @@
     = (!NILP (w->window_end_valid)
        && !current_buffer->clip_changed
        && !current_buffer->prevent_redisplay_optimizations_p
-       && XFASTINT (w->last_modified) >= MODIFF
-       && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF);
+       && w->last_modified >= MODIFF
+       && w->last_overlay_modified >= OVERLAY_MODIFF);
 
   /* Run the window-bottom-change-functions
      if it is possible that the text on the screen has changed
@@ -15415,8 +15416,8 @@
   buffer_unchanged_p
     = (!NILP (w->window_end_valid)
        && !current_buffer->clip_changed
-       && XFASTINT (w->last_modified) >= MODIFF
-       && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF);
+       && w->last_modified >= MODIFF
+       && w->last_overlay_modified >= OVERLAY_MODIFF);
 
   /* When windows_or_buffers_changed is non-zero, we can't rely on
      the window end being valid, so set it to nil there.  */
@@ -15441,9 +15442,9 @@
   if (!NILP (w->column_number_displayed)
       /* This alternative quickly identifies a common case
         where no change is needed.  */
-      && !(PT == XFASTINT (w->last_point)
-          && XFASTINT (w->last_modified) >= MODIFF
-          && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
+      && !(PT == w->last_point
+          && w->last_modified >= MODIFF
+          && w->last_overlay_modified >= OVERLAY_MODIFF)
       && (XFASTINT (w->column_number_displayed) != current_column ()))
     update_mode_line = 1;
 
@@ -15559,8 +15560,8 @@
          startp = run_window_scroll_functions (window, startp);
        }
 
-      w->last_modified = make_number (0);
-      w->last_overlay_modified = make_number (0);
+      w->last_modified = 0;
+      w->last_overlay_modified = 0;
       if (CHARPOS (startp) < BEGV)
        SET_TEXT_POS (startp, BEGV, BEGV_BYTE);
       else if (CHARPOS (startp) > ZV)
@@ -15685,8 +15686,8 @@
           && (CHARPOS (startp) < ZV
               /* Avoid starting at end of buffer.  */
               || CHARPOS (startp) == BEGV
-              || (XFASTINT (w->last_modified) >= MODIFF
-                  && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)))
+              || (w->last_modified >= MODIFF
+                  && w->last_overlay_modified >= OVERLAY_MODIFF)))
     {
       int d1, d2, d3, d4, d5, d6;
 
@@ -15773,8 +15774,8 @@
 
  try_to_scroll:
 
-  w->last_modified = make_number (0);
-  w->last_overlay_modified = make_number (0);
+  w->last_modified = 0;
+  w->last_overlay_modified = 0;
 
   /* Redisplay the mode line.  Select the buffer properly for that.  */
   if (!update_mode_line)
@@ -17133,11 +17134,11 @@
     GIVE_UP (5);
 
   /* Another way to prevent redisplay optimizations.  */
-  if (XFASTINT (w->last_modified) == 0)
+  if (w->last_modified == 0)
     GIVE_UP (6);
 
   /* Verify that window is not hscrolled.  */
-  if (XFASTINT (w->hscroll) != 0)
+  if (w->hscroll != 0)
     GIVE_UP (7);
 
   /* Verify that display wasn't paused.  */
@@ -27410,8 +27411,8 @@
   b = XBUFFER (w->buffer);
   if (part == ON_TEXT
       && EQ (w->window_end_valid, w->buffer)
-      && XFASTINT (w->last_modified) == BUF_MODIFF (b)
-      && XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b))
+      && w->last_modified == BUF_MODIFF (b)
+      && w->last_overlay_modified == BUF_OVERLAY_MODIFF (b))
     {
       int hpos, vpos, dx, dy, area = LAST_AREA;
       ptrdiff_t pos;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]