Mercurial > emacs
changeset 5085:82bcf2c36929
(compute_motion): Pass new arg to Fnext_single_property_change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 20 Nov 1993 09:44:09 +0000 |
parents | 863e092a5891 |
children | 6e9634463e93 |
files | src/indent.c |
diffstat | 1 files changed, 20 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/indent.c Sat Nov 20 09:43:41 1993 +0000 +++ b/src/indent.c Sat Nov 20 09:44:09 1993 +0000 @@ -460,25 +460,27 @@ /* 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; + { + XFASTINT (position) = pos; + prop = Fget_text_property (position, + Qinvisible, + Fcurrent_buffer ()); + { + Lisp_Object end, limit; - 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; - } - } + /* 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