aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c
index fc09dc41d81..b6e8039adf8 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -887,9 +887,18 @@ is the string or buffer containing the text.")
887 if (NILP (object)) 887 if (NILP (object))
888 XSET (object, Lisp_Buffer, current_buffer); 888 XSET (object, Lisp_Buffer, current_buffer);
889 889
890 i = validate_interval_range (object, &start, &end, hard); 890 i = validate_interval_range (object, &start, &end, soft);
891 if (NULL_INTERVAL_P (i)) 891 if (NULL_INTERVAL_P (i))
892 return Qnil; 892 {
893 /* If buffer has no props, and we want none, return now. */
894 if (NILP (props))
895 return Qnil;
896
897 i = validate_interval_range (object, &start, &end, hard);
898 /* This can return if start == end. */
899 if (NULL_INTERVAL_P (i))
900 return Qnil;
901 }
893 902
894 s = XINT (start); 903 s = XINT (start);
895 len = XINT (end) - s; 904 len = XINT (end) - s;