]> git.eshelyaron.com Git - emacs.git/commitdiff
(compute_motion): Pass new arg to Fnext_single_property_change.
authorRichard M. Stallman <rms@gnu.org>
Sat, 20 Nov 1993 09:44:09 +0000 (09:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 20 Nov 1993 09:44:09 +0000 (09:44 +0000)
src/indent.c

index f47cb2091bd6febdac0245ceb211109d02ea3315..569057d895a3117346ac84e12a2303042e1e7c7b 100644 (file)
@@ -460,25 +460,27 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
       /* if the `invisible' property is set, we can skip to
         the next property change */
       while (pos == next_invisible && pos < to)
-      {
-       XFASTINT (position) = pos;
-       prop = Fget_text_property (position,
-                                  Qinvisible,
-                                  Fcurrent_buffer ());
-        {
-         Lisp_Object end;
-
-         end = Fnext_single_property_change (position,
-                                             Qinvisible,
-                                             Fcurrent_buffer ());
-         if (INTEGERP (end))
-           next_invisible = XINT (end);
-         else
-           next_invisible = to;
-         if (! NILP (prop))
-           pos = next_invisible;
-        }
-      }
+       {
+         XFASTINT (position) = pos;
+         prop = Fget_text_property (position,
+                                    Qinvisible,
+                                    Fcurrent_buffer ());
+         {
+           Lisp_Object end, limit;
+
+           /* This is just an estimate to give reasonable
+              performance; nothing should go wrong if it is too small.  */
+           XFASTINT (limit) = pos + 100;
+           end = Fnext_single_property_change (position, Qinvisible,
+                                               Fcurrent_buffer (), limit);
+           if (INTEGERP (end))
+             next_invisible = XINT (end);
+           else
+             next_invisible = to;
+           if (! NILP (prop))
+             pos = next_invisible;
+         }
+       }
       if (pos >= to)
        break;
 #endif