]> git.eshelyaron.com Git - emacs.git/commitdiff
(update_syntax_table): Properly reproduce the special +1
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 29 Aug 2005 20:49:28 +0000 (20:49 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 29 Aug 2005 20:49:28 +0000 (20:49 +0000)
setting of e_property at the end of the buffer when bumping into the
INTERVALS_AT_ONCE limit.

src/ChangeLog
src/syntax.c

index 66684aac15b70b22de3996662af33e5fd86510e7..1c8b3a3846c2718c4f2d43506791cf31945a45e9 100644 (file)
@@ -1,7 +1,17 @@
+2005-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * syntax.c (update_syntax_table): Properly reproduce the special +1
+       setting of e_property at the end of the buffer when bumping into the
+       INTERVALS_AT_ONCE limit.
+
 2005-08-27  Eli Zaretskii  <eliz@gnu.org>
 
        * emacs.c (USAGE1): Fix the description of the -Q option.
 
+2005-08-26  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * xdisp.c (pos_visible_p): Yet another int/Lisp_Object mixup (YAILOM).
+
 2005-08-26  Kim F. Storm  <storm@cua.dk>
 
        * xdisp.c (resize_mini_window): Fix 2005-08-20 change.
@@ -12,8 +22,8 @@
        * keyboard.c (kbd_buffer_get_event) [MAC_OS]: Make events for
        ICONIFY/DEICONIFY_EVENT.
 
-       * macterm.c (mac_copy_area, mac_copy_area_with_mask): Restore
-       background color.
+       * macterm.c (mac_copy_area, mac_copy_area_with_mask):
+       Restore background color.
        (mac_handle_visibility_change): New function.
        (x_make_frame_invisible, x_iconify_frame)
        (XTread_socket) [!USE_CARBON_EVENTS]: Use it.
index 0071dcebd80b0c562048db1fafac7c165eefce82..2043cff63d69da366c7df5a7a33f1b647361eb5e 100644 (file)
@@ -133,7 +133,7 @@ update_syntax_table (charpos, count, init, object)
 {
   Lisp_Object tmp_table;
   int cnt = 0, invalidate = 1;
-  INTERVAL i, oldi;
+  INTERVAL i;
 
   if (init)
     {
@@ -164,7 +164,7 @@ update_syntax_table (charpos, count, init, object)
       gl_state.e_property = INTERVAL_LAST_POS (i) - gl_state.offset;
       goto update;
     }
-  oldi = i = count > 0 ? gl_state.forward_i : gl_state.backward_i;
+  i = count > 0 ? gl_state.forward_i : gl_state.backward_i;
 
   /* We are guaranteed to be called with CHARPOS either in i,
      or further off.  */
@@ -249,7 +249,8 @@ update_syntax_table (charpos, count, init, object)
            }
          else
            {
-             gl_state.b_property = i->position + LENGTH (i) - gl_state.offset;
+             gl_state.b_property
+               = i->position + LENGTH (i) - gl_state.offset;
              gl_state.backward_i = i;
            }
          return;
@@ -258,7 +259,12 @@ update_syntax_table (charpos, count, init, object)
        {
          if (count > 0)
            {
-             gl_state.e_property = i->position + LENGTH (i) - gl_state.offset;
+             gl_state.e_property
+               = i->position + LENGTH (i) - gl_state.offset
+               /* e_property at EOB is not set to ZV but to ZV+1, so that
+                  we can do INC(from);UPDATE_SYNTAX_TABLE_FORWARD without
+                  having to check eob between the two.  */
+               + (NULL_INTERVAL_P (next_interval (i)) ? 1 : 0);
              gl_state.forward_i = i;
            }
          else