changeset 45561:54b933234eb4

(Fwrite_region): If START is a string, don't make any annotations.
author Richard M. Stallman <rms@gnu.org>
date Tue, 28 May 2002 20:25:46 +0000
parents f1be57638503
children 1b62cee42a61
files src/fileio.c
diffstat 1 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Tue May 28 20:24:32 2002 +0000
+++ b/src/fileio.c	Tue May 28 20:25:46 2002 +0000
@@ -4827,11 +4827,16 @@
   count1 = specpdl_ptr - specpdl;
 
   given_buffer = current_buffer;
-  annotations = build_annotations (start, end);
-  if (current_buffer != given_buffer)
+
+  if (!STRINGP (start))
     {
-      XSETFASTINT (start, BEGV);
-      XSETFASTINT (end, ZV);
+      annotations = build_annotations (start, end);
+
+      if (current_buffer != given_buffer)
+	{
+	  XSETFASTINT (start, BEGV);
+	  XSETFASTINT (end, ZV);
+	}
     }
 
   UNGCPRO;
@@ -4847,12 +4852,15 @@
   Vlast_coding_system_used = coding.symbol;
 
   given_buffer = current_buffer;
-  annotations = build_annotations_2 (start, end,
-				     coding.pre_write_conversion, annotations);
-  if (current_buffer != given_buffer)
+  if (! STRINGP (start))
     {
-      XSETFASTINT (start, BEGV);
-      XSETFASTINT (end, ZV);
+      annotations = build_annotations_2 (start, end,
+					 coding.pre_write_conversion, annotations);
+      if (current_buffer != given_buffer)
+	{
+	  XSETFASTINT (start, BEGV);
+	  XSETFASTINT (end, ZV);
+	}
     }
 
 #ifdef CLASH_DETECTION