diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-04-11 18:25:41 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-04-11 18:25:41 +0000 |
commit | 5897c03141d0cba93d65048353d7bf54825fda9e (patch) | |
tree | be3c36fee71f8414c71f82b44352ad97f096f4db /src | |
parent | 5deaf557095268aeb20f1136fd9d69cdbe389e7a (diff) | |
download | emacs-5897c03141d0cba93d65048353d7bf54825fda9e.tar.gz |
(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\ inserted -= (Z - same_at_end) + (same_at_start - BEG); move_gap (same_at_start); del_range_1 (same_at_start, same_at_end, 0); - insert (conversion_buffer + same_at_start - BEG, inserted); + SET_PT (same_at_start); + insert_1 (conversion_buffer + same_at_start - BEG, inserted, 0, 0); free (conversion_buffer); close (fd); @@ -3687,7 +3688,11 @@ This does code conversion according to the value of\n\ inserted = XFASTINT (insval); } - if (inserted > 0 && NILP (visit) && total > 0) + /* Call after-change hooks for the inserted text, aside from the case + of normal visiting (not with REPLACE), which is done in a new buffer + "before" the buffer is changed. */ + if (inserted > 0 && total > 0 + && (NILP (visit) || !NILP (replace))) signal_after_change (PT, 0, inserted); if (inserted > 0) |