]> code.delx.au - gnu-emacs/commitdiff
(Fset_text_properties): Call set_properties
authorRichard M. Stallman <rms@gnu.org>
Sat, 18 Nov 1995 16:22:42 +0000 (16:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 18 Nov 1995 16:22:42 +0000 (16:22 +0000)
even if we also merge an interval.

src/textprop.c

index b071b34750812fd9bce8206f5c6798c44e70c20d..a4f697810ed59a7824a7d0cf046b23d1ce36f6bc 100644 (file)
@@ -1030,19 +1030,23 @@ is the string or buffer containing the text.")
          if (LENGTH (i) > len)
            i = split_interval_left (i, len);
 
-         if (NULL_INTERVAL_P (prev_changed))
-           set_properties (props, i, object);
-         else
+         /* We have to call set_properties even if we are going to
+            merge the intervals, so as to make the undo records
+            and cause redisplay to happen.  */
+         set_properties (props, i, object);
+         if (!NULL_INTERVAL_P (prev_changed))
            merge_interval_left (i);
          return Qt;
        }
 
       len -= LENGTH (i);
+
+      /* We have to call set_properties even if we are going to
+        merge the intervals, so as to make the undo records
+        and cause redisplay to happen.  */
+      set_properties (props, i, object);
       if (NULL_INTERVAL_P (prev_changed))
-       {
-         set_properties (props, i, object);
-         prev_changed = i;
-       }
+       prev_changed = i;
       else
        prev_changed = i = merge_interval_left (i);