Mercurial > emacs
comparison src/fileio.c @ 6177:ac2ef13dca1b
(Finsert_file_contents): If undo_list was t, leave it t.
(Finsert_file_contents): Use del_range_1.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 03 Mar 1994 19:24:54 +0000 |
parents | 7e9984c9a36e |
children | dd271c6b4e56 |
comparison
equal
deleted
inserted
replaced
6176:1dbec303c87b | 6177:ac2ef13dca1b |
---|---|
2679 } | 2679 } |
2680 immediate_quit = 0; | 2680 immediate_quit = 0; |
2681 /* Arrange to read only the nonmatching middle part of the file. */ | 2681 /* Arrange to read only the nonmatching middle part of the file. */ |
2682 XFASTINT (beg) = same_at_start - BEGV; | 2682 XFASTINT (beg) = same_at_start - BEGV; |
2683 XFASTINT (end) = st.st_size - (ZV - same_at_end); | 2683 XFASTINT (end) = st.st_size - (ZV - same_at_end); |
2684 /* Delete the nonmatching middle part of the buffer. */ | 2684 del_range_1 (same_at_start, same_at_end - same_at_start, 0); |
2685 Fdelete_region (make_number (same_at_start), make_number (same_at_end)); | |
2686 /* Insert from the file at the proper position. */ | 2685 /* Insert from the file at the proper position. */ |
2687 SET_PT (same_at_start); | 2686 SET_PT (same_at_start); |
2688 } | 2687 } |
2689 | 2688 |
2690 total = XINT (end) - XINT (beg); | 2689 total = XINT (end) - XINT (beg); |
2782 notfound: | 2781 notfound: |
2783 handled: | 2782 handled: |
2784 | 2783 |
2785 if (!NILP (visit)) | 2784 if (!NILP (visit)) |
2786 { | 2785 { |
2787 current_buffer->undo_list = Qnil; | 2786 if (!EQ (current_buffer->undo_list, Qt)) |
2787 current_buffer->undo_list = Qnil; | |
2788 #ifdef APOLLO | 2788 #ifdef APOLLO |
2789 stat (XSTRING (filename)->data, &st); | 2789 stat (XSTRING (filename)->data, &st); |
2790 #endif | 2790 #endif |
2791 | 2791 |
2792 if (NILP (handler)) | 2792 if (NILP (handler)) |