changeset 5395:e11486a64dab

(Finsert_file_contents): Avoid setting buffer-file-name field if ran a handler. Get rid of local var `handled'.
author Richard M. Stallman <rms@gnu.org>
date Fri, 31 Dec 1993 18:16:16 +0000
parents ca6521958577
children a38c30848cbe
files src/fileio.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Fri Dec 31 17:29:12 1993 +0000
+++ b/src/fileio.c	Fri Dec 31 18:16:16 1993 +0000
@@ -2394,7 +2394,6 @@
   Lisp_Object handler, val, insval;
   Lisp_Object p;
   int total;
-  int handled = 0;
 
   val = Qnil;
   p = Qnil;
@@ -2412,7 +2411,6 @@
   if (!NILP (handler))
     {
       val = call5 (handler, Qinsert_file_contents, filename, visit, beg, end);
-      handled = 1;
       goto handled;
     }
 
@@ -2544,8 +2542,11 @@
       stat (XSTRING (filename)->data, &st);
 #endif
 
-      if (! handled)
-	current_buffer->modtime = st.st_mtime;
+      if (NILP (handler))
+	{
+	  current_buffer->modtime = st.st_mtime;
+	  current_buffer->filename = filename;
+	}
 
       current_buffer->save_modified = MODIFF;
       current_buffer->auto_save_modified = MODIFF;
@@ -2558,7 +2559,6 @@
 	  unlock_file (filename);
 	}
 #endif /* CLASH_DETECTION */
-      current_buffer->filename = filename;
       /* If visiting nonexistent file, return nil.  */
       if (current_buffer->modtime == -1)
 	report_file_error ("Opening input file", Fcons (filename, Qnil));