aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-03-11 22:03:27 +0000
committerRichard M. Stallman1995-03-11 22:03:27 +0000
commit041aa96f12491a64f0f0d4fec6a56eb83f38ffbf (patch)
tree2eb7a323d8ccf79ead15e6acf65fd37d13e505e2 /src
parent9184aafbcde0d14e40ca0d20b435f8a409f3d1a4 (diff)
downloademacs-041aa96f12491a64f0f0d4fec6a56eb83f38ffbf.tar.gz
emacs-041aa96f12491a64f0f0d4fec6a56eb83f38ffbf.zip
(Fnext_property_change): Handle LIMIT = t.
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/textprop.c b/src/textprop.c
index be55e59aefa..7e92be89865 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -606,7 +606,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
606 if (NILP (object)) 606 if (NILP (object))
607 XSETBUFFER (object, current_buffer); 607 XSETBUFFER (object, current_buffer);
608 608
609 if (!NILP (limit)) 609 if (! NILP (limit) && ! EQ (limit, Qt))
610 CHECK_NUMBER_COERCE_MARKER (limit, 0); 610 CHECK_NUMBER_COERCE_MARKER (limit, 0);
611 611
612 i = validate_interval_range (object, &pos, &pos, soft); 612 i = validate_interval_range (object, &pos, &pos, soft);
@@ -614,6 +614,14 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
614 return limit; 614 return limit;
615 615
616 next = next_interval (i); 616 next = next_interval (i);
617 /* If LIMIT is t, return start of next interval--don't
618 bother checking further intervals. */
619 if (EQ (limit, Qt))
620 {
621 XSETFASTINT (pos, next->position - (STRINGP (object)));
622 return pos;
623 }
624
617 while (! NULL_INTERVAL_P (next) && intervals_equal (i, next) 625 while (! NULL_INTERVAL_P (next) && intervals_equal (i, next)
618 && (NILP (limit) || next->position < XFASTINT (limit))) 626 && (NILP (limit) || next->position < XFASTINT (limit)))
619 next = next_interval (next); 627 next = next_interval (next);