diff options
| author | Richard M. Stallman | 1995-10-21 23:15:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-21 23:15:21 +0000 |
| commit | 44214c1bc80d73bc461051df98f84dbac2c02313 (patch) | |
| tree | 2a62a616d0ff392485fd301da1fd6a2bd6cee388 /src | |
| parent | 637df16f38d9ebe4e6032378828d9c49248d1dbb (diff) | |
| download | emacs-44214c1bc80d73bc461051df98f84dbac2c02313.tar.gz emacs-44214c1bc80d73bc461051df98f84dbac2c02313.zip | |
(Fnext_single_property_change): Rearrange handling of
limit = t; don't return t.
Diffstat (limited to 'src')
| -rw-r--r-- | src/textprop.c | 13 |
1 files changed, 10 insertions, 3 deletions
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.") | |||
| 624 | CHECK_NUMBER_COERCE_MARKER (limit, 0); | 624 | CHECK_NUMBER_COERCE_MARKER (limit, 0); |
| 625 | 625 | ||
| 626 | i = validate_interval_range (object, &pos, &pos, soft); | 626 | i = validate_interval_range (object, &pos, &pos, soft); |
| 627 | if (NULL_INTERVAL_P (i)) | ||
| 628 | return limit; | ||
| 629 | 627 | ||
| 630 | next = next_interval (i); | ||
| 631 | /* If LIMIT is t, return start of next interval--don't | 628 | /* If LIMIT is t, return start of next interval--don't |
| 632 | bother checking further intervals. */ | 629 | bother checking further intervals. */ |
| 633 | if (EQ (limit, Qt)) | 630 | if (EQ (limit, Qt)) |
| 634 | { | 631 | { |
| 632 | if (NULL_INTERVAL_P (i)) | ||
| 633 | next = i; | ||
| 634 | else | ||
| 635 | next = next_interval (i); | ||
| 636 | |||
| 635 | if (NULL_INTERVAL_P (next)) | 637 | if (NULL_INTERVAL_P (next)) |
| 636 | XSETFASTINT (pos, (STRINGP (object) | 638 | XSETFASTINT (pos, (STRINGP (object) |
| 637 | ? XSTRING (object)->size | 639 | ? XSTRING (object)->size |
| @@ -641,6 +643,11 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.") | |||
| 641 | return pos; | 643 | return pos; |
| 642 | } | 644 | } |
| 643 | 645 | ||
| 646 | if (NULL_INTERVAL_P (i)) | ||
| 647 | return limit; | ||
| 648 | |||
| 649 | next = next_interval (i); | ||
| 650 | |||
| 644 | while (! NULL_INTERVAL_P (next) && intervals_equal (i, next) | 651 | while (! NULL_INTERVAL_P (next) && intervals_equal (i, next) |
| 645 | && (NILP (limit) || next->position < XFASTINT (limit))) | 652 | && (NILP (limit) || next->position < XFASTINT (limit))) |
| 646 | next = next_interval (next); | 653 | next = next_interval (next); |