summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-03-11 22:03:27 +0000
committerRichard M. Stallman <rms@gnu.org>1995-03-11 22:03:27 +0000
commit041aa96f12491a64f0f0d4fec6a56eb83f38ffbf (patch)
tree2eb7a323d8ccf79ead15e6acf65fd37d13e505e2 /src/textprop.c
parent9184aafbcde0d14e40ca0d20b435f8a409f3d1a4 (diff)
downloademacs-041aa96f12491a64f0f0d4fec6a56eb83f38ffbf.tar.gz
(Fnext_property_change): Handle LIMIT = t.
Diffstat (limited to 'src/textprop.c')
-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.")
if (NILP (object))
XSETBUFFER (object, current_buffer);
- if (!NILP (limit))
+ if (! NILP (limit) && ! EQ (limit, Qt))
CHECK_NUMBER_COERCE_MARKER (limit, 0);
i = validate_interval_range (object, &pos, &pos, soft);
@@ -614,6 +614,14 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
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))
+ {
+ XSETFASTINT (pos, next->position - (STRINGP (object)));
+ return pos;
+ }
+
while (! NULL_INTERVAL_P (next) && intervals_equal (i, next)
&& (NILP (limit) || next->position < XFASTINT (limit)))
next = next_interval (next);