]> git.eshelyaron.com Git - emacs.git/commitdiff
(Finsert_file_contents): If undo_list was t, leave it t.
authorRichard M. Stallman <rms@gnu.org>
Thu, 3 Mar 1994 19:24:54 +0000 (19:24 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 3 Mar 1994 19:24:54 +0000 (19:24 +0000)
(Finsert_file_contents): Use del_range_1.

src/fileio.c

index b4cec454163288ddf5cd04613e7a8235f5307650..a95c9847910f36906c2d573a9ca3ac8baf51ad80 100644 (file)
@@ -2681,8 +2681,7 @@ and (2) it puts less data in the undo list.")
       /* Arrange to read only the nonmatching middle part of the file.  */
       XFASTINT (beg) = same_at_start - BEGV;
       XFASTINT (end) = st.st_size - (ZV - same_at_end);
-      /* Delete the nonmatching middle part of the buffer.  */
-      Fdelete_region (make_number (same_at_start), make_number (same_at_end));
+      del_range_1 (same_at_start, same_at_end - same_at_start, 0);
       /* Insert from the file at the proper position.  */
       SET_PT (same_at_start);
     }
@@ -2784,7 +2783,8 @@ and (2) it puts less data in the undo list.")
 
   if (!NILP (visit))
     {
-      current_buffer->undo_list = Qnil;
+      if (!EQ (current_buffer->undo_list, Qt))
+       current_buffer->undo_list = Qnil;
 #ifdef APOLLO
       stat (XSTRING (filename)->data, &st);
 #endif