From: Richard M. Stallman Date: Thu, 3 Mar 1994 19:24:54 +0000 (+0000) Subject: (Finsert_file_contents): If undo_list was t, leave it t. X-Git-Tag: emacs-19.34~9675 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cfadd37670cdcd20b65ab3809f9aa07e132a0409;p=emacs.git (Finsert_file_contents): If undo_list was t, leave it t. (Finsert_file_contents): Use del_range_1. --- diff --git a/src/fileio.c b/src/fileio.c index b4cec454163..a95c9847910 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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