From: Richard M. Stallman Date: Sat, 15 Oct 1994 21:29:19 +0000 (+0000) Subject: (Fset_text_properties): Special case for getting X-Git-Tag: emacs-19.34~6313 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=919fa9cbf0b0aabb55af71e54a2050304f4347bf;p=emacs.git (Fset_text_properties): Special case for getting rid of all properties of a string. --- diff --git a/src/textprop.c b/src/textprop.c index 19f469875b8..2e76f0c17ab 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -902,7 +902,18 @@ is the string or buffer containing the text.") if (NILP (object)) XSETBUFFER (object, current_buffer); + /* If we want no properties for a whole string, + get rid of its intervals. */ + if (NILP (props) && STRINGP (object) + && XFASTINT (start) == 0 + && XFASTINT (end) == XSTRING (object)->size) + { + XSTRING (object)->intervals = 0; + return Qt; + } + i = validate_interval_range (object, &start, &end, soft); + if (NULL_INTERVAL_P (i)) { /* If buffer has no props, and we want none, return now. */