diff options
| author | Richard M. Stallman | 1997-04-11 18:25:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-11 18:25:41 +0000 |
| commit | 0342d8c579a4b9d7b6377e0fc92d74acd2acd0a9 (patch) | |
| tree | e2dce63201a3ac52e1c7bb28945dc39d676344e1 /src | |
| parent | a3edd195b67b3e92b73c2bf214eb5e793c6888a2 (diff) | |
| download | emacs-0342d8c579a4b9d7b6377e0fc92d74acd2acd0a9.tar.gz emacs-0342d8c579a4b9d7b6377e0fc92d74acd2acd0a9.zip | |
(Finsert_file_contents): Do call signal_after_change
when REPLACE is handled by reading directly from the file.
Use insert_1 to insert replacement text, to avoid
query about whether to modify the buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index 0e04ef4a3d9..3be84dcb52f 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3468,7 +3468,8 @@ This does code conversion according to the value of\n\ | |||
| 3468 | inserted -= (Z - same_at_end) + (same_at_start - BEG); | 3468 | inserted -= (Z - same_at_end) + (same_at_start - BEG); |
| 3469 | move_gap (same_at_start); | 3469 | move_gap (same_at_start); |
| 3470 | del_range_1 (same_at_start, same_at_end, 0); | 3470 | del_range_1 (same_at_start, same_at_end, 0); |
| 3471 | insert (conversion_buffer + same_at_start - BEG, inserted); | 3471 | SET_PT (same_at_start); |
| 3472 | insert_1 (conversion_buffer + same_at_start - BEG, inserted, 0, 0); | ||
| 3472 | 3473 | ||
| 3473 | free (conversion_buffer); | 3474 | free (conversion_buffer); |
| 3474 | close (fd); | 3475 | close (fd); |
| @@ -3687,7 +3688,11 @@ This does code conversion according to the value of\n\ | |||
| 3687 | inserted = XFASTINT (insval); | 3688 | inserted = XFASTINT (insval); |
| 3688 | } | 3689 | } |
| 3689 | 3690 | ||
| 3690 | if (inserted > 0 && NILP (visit) && total > 0) | 3691 | /* Call after-change hooks for the inserted text, aside from the case |
| 3692 | of normal visiting (not with REPLACE), which is done in a new buffer | ||
| 3693 | "before" the buffer is changed. */ | ||
| 3694 | if (inserted > 0 && total > 0 | ||
| 3695 | && (NILP (visit) || !NILP (replace))) | ||
| 3691 | signal_after_change (PT, 0, inserted); | 3696 | signal_after_change (PT, 0, inserted); |
| 3692 | 3697 | ||
| 3693 | if (inserted > 0) | 3698 | if (inserted > 0) |