changeset 21765:747446245094

(insert_from_string, insert_from_string_before_markers): Don't special case LENGTH = 0. (insert_from_buffer): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Sat, 25 Apr 1998 23:32:56 +0000
parents 9d02cc13f771
children 915b4091ede1
files src/insdel.c
diffstat 1 files changed, 11 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Sat Apr 25 23:08:24 1998 +0000
+++ b/src/insdel.c	Sat Apr 25 23:32:56 1998 +0000
@@ -1130,13 +1130,10 @@
      register int pos, pos_byte, length, length_byte;
      int inherit;
 {
-  if (length > 0)
-    {
-      int opoint = PT;
-      insert_from_string_1 (string, pos, pos_byte, length, length_byte,
-			    inherit, 0);
-      signal_after_change (opoint, 0, PT - opoint);
-    }
+  int opoint = PT;
+  insert_from_string_1 (string, pos, pos_byte, length, length_byte,
+			inherit, 0);
+  signal_after_change (opoint, 0, PT - opoint);
 }
 
 /* Like `insert_from_string' except that all markers pointing
@@ -1149,13 +1146,10 @@
      register int pos, pos_byte, length, length_byte;
      int inherit;
 {
-  if (length > 0)
-    {
-      int opoint = PT;
-      insert_from_string_1 (string, pos, pos_byte, length, length_byte,
-			    inherit, 1);
-      signal_after_change (opoint, 0, PT - opoint);
-    }
+  int opoint = PT;
+  insert_from_string_1 (string, pos, pos_byte, length, length_byte,
+			inherit, 1);
+  signal_after_change (opoint, 0, PT - opoint);
 }
 
 /* Subroutine of the insertion functions above.  */
@@ -1311,13 +1305,10 @@
      int charpos, nchars;
      int inherit;
 {
-  if (nchars > 0)
-    {
-      int opoint = PT;
+  int opoint = PT;
 
-      insert_from_buffer_1 (buf, charpos, nchars, inherit);
-      signal_after_change (opoint, 0, PT - opoint);
-    }
+  insert_from_buffer_1 (buf, charpos, nchars, inherit);
+  signal_after_change (opoint, 0, PT - opoint);
 }
 
 static void