changeset 33249:bc4bfaca97aa

(Fwrite_region): Use `visiting' rather than `visit' when ensuring we don't do visit in indirect buffer.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 06 Nov 2000 14:33:25 +0000
parents 76c004353ceb
children fb24f36f4f0d
files src/fileio.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Mon Nov 06 13:21:09 2000 +0000
+++ b/src/fileio.c	Mon Nov 06 14:33:25 2000 +0000
@@ -4411,7 +4411,8 @@
   Lisp_Object visit_file;
   Lisp_Object annotations;
   Lisp_Object encoded_filename;
-  int visiting, quietly;
+  int visiting = (EQ (visit, Qt) || STRINGP (visit));
+  int quietly = !NILP (visit);
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
   struct buffer *given_buffer;
 #ifdef DOS_NT
@@ -4419,7 +4420,7 @@
 #endif /* DOS_NT */
   struct coding_system coding;
 
-  if (current_buffer->base_buffer && ! NILP (visit))
+  if (current_buffer->base_buffer && visiting)
     error ("Cannot do file visiting in an indirect buffer");
 
   if (!NILP (start) && !STRINGP (start))
@@ -4531,9 +4532,6 @@
     visit_file = filename;
   UNGCPRO;
 
-  visiting = (EQ (visit, Qt) || STRINGP (visit));
-  quietly = !NILP (visit);
-
   annotations = Qnil;
 
   if (NILP (lockname))