summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/textprop.c b/src/textprop.c
index e293eeadb6e..5f78ab95cad 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -601,6 +601,9 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
if (NILP (object))
XSET (object, Lisp_Buffer, current_buffer);
+ if (!NILP (limit))
+ CHECK_NUMBER_COERCE_MARKER (limit, 0);
+
i = validate_interval_range (object, &pos, &pos, soft);
if (NULL_INTERVAL_P (i))
return limit;
@@ -670,6 +673,9 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
if (NILP (object))
XSET (object, Lisp_Buffer, current_buffer);
+ if (!NILP (limit))
+ CHECK_NUMBER_COERCE_MARKER (limit, 0);
+
i = validate_interval_range (object, &pos, &pos, soft);
if (NULL_INTERVAL_P (i))
return limit;
@@ -707,6 +713,9 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
if (NILP (object))
XSET (object, Lisp_Buffer, current_buffer);
+ if (!NILP (limit))
+ CHECK_NUMBER_COERCE_MARKER (limit, 0);
+
i = validate_interval_range (object, &pos, &pos, soft);
if (NULL_INTERVAL_P (i))
return limit;
@@ -750,6 +759,9 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
if (NILP (object))
XSET (object, Lisp_Buffer, current_buffer);
+ if (!NILP (limit))
+ CHECK_NUMBER_COERCE_MARKER (limit, 0);
+
i = validate_interval_range (object, &pos, &pos, soft);
if (NULL_INTERVAL_P (i))
return limit;