summaryrefslogtreecommitdiff
path: root/src/indent.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-20 09:44:09 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-20 09:44:09 +0000
commita4c1b691d971a93d9271163c81f8d00ef6570d51 (patch)
tree7ce95e4a1e82eee7f914b11ba030c3a7a935c30b /src/indent.c
parenta5fc15e3c0f972ee3662284806689837cd5a3ff2 (diff)
downloademacs-a4c1b691d971a93d9271163c81f8d00ef6570d51.tar.gz
(compute_motion): Pass new arg to Fnext_single_property_change.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/indent.c b/src/indent.c
index f47cb2091bd..569057d895a 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -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