Mercurial > emacs
changeset 13265:dbc038e66ea6
(Fnext_single_property_change): Rearrange handling of
limit = t; don't return t.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Oct 1995 23:15:21 +0000 |
parents | 4e7bb697c847 |
children | d6bba071525c |
files | src/textprop.c |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/textprop.c Sat Oct 21 23:14:59 1995 +0000 +++ b/src/textprop.c Sat Oct 21 23:15:21 1995 +0000 @@ -624,14 +624,16 @@ CHECK_NUMBER_COERCE_MARKER (limit, 0); i = validate_interval_range (object, &pos, &pos, soft); - if (NULL_INTERVAL_P (i)) - return limit; - next = next_interval (i); /* If LIMIT is t, return start of next interval--don't bother checking further intervals. */ if (EQ (limit, Qt)) { + if (NULL_INTERVAL_P (i)) + next = i; + else + next = next_interval (i); + if (NULL_INTERVAL_P (next)) XSETFASTINT (pos, (STRINGP (object) ? XSTRING (object)->size @@ -641,6 +643,11 @@ return pos; } + if (NULL_INTERVAL_P (i)) + return limit; + + next = next_interval (i); + while (! NULL_INTERVAL_P (next) && intervals_equal (i, next) && (NILP (limit) || next->position < XFASTINT (limit))) next = next_interval (next);