changeset 8647:d66b80e5bc77

(insert_1): New arg INHERIT. (insert_and_inherit): New function.
author Richard M. Stallman <rms@gnu.org>
date Sun, 28 Aug 1994 06:07:37 +0000
parents 0f05e3e89f87
children f047d8c6db79
files src/insdel.c
diffstat 1 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Sun Aug 28 06:07:15 1994 +0000
+++ b/src/insdel.c	Sun Aug 28 06:07:37 1994 +0000
@@ -309,15 +309,27 @@
 {
   if (length > 0)
     {
-      insert_1 (string, length);
+      insert_1 (string, length, 0);
+      signal_after_change (PT-length, 0, length);
+    }
+}
+
+insert_and_inherit (string, length)
+     register unsigned char *string;
+     register length;
+{
+  if (length > 0)
+    {
+      insert_1 (string, length, 1);
       signal_after_change (PT-length, 0, length);
     }
 }
 
 static void
-insert_1 (string, length)
+insert_1 (string, length, inherit)
      register unsigned char *string;
      register length;
+     int inherit;
 {
   register Lisp_Object temp;
 
@@ -346,6 +358,10 @@
   ZV += length;
   Z += length;
   adjust_point (length);
+
+  if (!inherit)
+    Fset_text_properties (make_number (PT - length), make_number (PT),
+			  Qnil, Qnil);
 }
 
 /* Insert the part of the text of STRING, a Lisp object assumed to be
@@ -442,7 +458,7 @@
   if (length > 0)
     {
       register int opoint = PT;
-      insert_1 (string, length);
+      insert_1 (string, length, 1);
       adjust_markers (opoint - 1, opoint, length);
       signal_after_change (PT-length, 0, length);
     }