# HG changeset patch # User Richard M. Stallman # Date 814317321 0 # Node ID dbc038e66ea6b9cf442cbc60871881cf6a7e09f8 # Parent 4e7bb697c847c5a1109f2f7e6c7e1e6927900003 (Fnext_single_property_change): Rearrange handling of limit = t; don't return t. diff -r 4e7bb697c847 -r dbc038e66ea6 src/textprop.c --- 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);