From: Richard M. Stallman Date: Sat, 21 Oct 1995 23:15:21 +0000 (+0000) Subject: (Fnext_single_property_change): Rearrange handling of X-Git-Tag: emacs-19.34~2595 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=44214c1bc80d73bc461051df98f84dbac2c02313;p=emacs.git (Fnext_single_property_change): Rearrange handling of limit = t; don't return t. --- diff --git a/src/textprop.c b/src/textprop.c index ad41534c3ef..b071b347508 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -624,14 +624,16 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.") 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 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.") 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);