aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-15 21:29:19 +0000
committerRichard M. Stallman1994-10-15 21:29:19 +0000
commit919fa9cbf0b0aabb55af71e54a2050304f4347bf (patch)
treed26611290a8787460995102a702d82984840a2d7 /src
parentcc101382e8ce745cdb17236c22aa2d0ddbf817c3 (diff)
downloademacs-919fa9cbf0b0aabb55af71e54a2050304f4347bf.tar.gz
emacs-919fa9cbf0b0aabb55af71e54a2050304f4347bf.zip
(Fset_text_properties): Special case for getting
rid of all properties of a string.
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c11
1 files changed, 11 insertions, 0 deletions
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.")
902 if (NILP (object)) 902 if (NILP (object))
903 XSETBUFFER (object, current_buffer); 903 XSETBUFFER (object, current_buffer);
904 904
905 /* If we want no properties for a whole string,
906 get rid of its intervals. */
907 if (NILP (props) && STRINGP (object)
908 && XFASTINT (start) == 0
909 && XFASTINT (end) == XSTRING (object)->size)
910 {
911 XSTRING (object)->intervals = 0;
912 return Qt;
913 }
914
905 i = validate_interval_range (object, &start, &end, soft); 915 i = validate_interval_range (object, &start, &end, soft);
916
906 if (NULL_INTERVAL_P (i)) 917 if (NULL_INTERVAL_P (i))
907 { 918 {
908 /* If buffer has no props, and we want none, return now. */ 919 /* If buffer has no props, and we want none, return now. */