aboutsummaryrefslogtreecommitdiffstats
path: root/src/textprop.c
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-02 23:27:04 +0000
committerRichard M. Stallman1994-09-02 23:27:04 +0000
commitfacc570e2b1f74c98ccd7808cc7601c01bfa9f63 (patch)
treebcbcb1032393c51084a6bc0fcaed100bb869cde2 /src/textprop.c
parent09d1d7e297e5c54798a85b2a5de5a06d27f50caa (diff)
downloademacs-facc570e2b1f74c98ccd7808cc7601c01bfa9f63.tar.gz
emacs-facc570e2b1f74c98ccd7808cc7601c01bfa9f63.zip
(Fset_text_properties):
Return early if buffer has no intervals and PROPS is nil.
Diffstat (limited to 'src/textprop.c')
-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;