diff options
| author | Kenichi Handa | 2004-12-30 12:28:41 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-12-30 12:28:41 +0000 |
| commit | 37a3c7744cd360d7eb967fae90b562431bc021a5 (patch) | |
| tree | 7a6fa9cc3ee641ab755df3ce2d15a520be7466d7 /src | |
| parent | 6875d1ae8cdb7993849ba380cdeb9ed8cd542c74 (diff) | |
| download | emacs-37a3c7744cd360d7eb967fae90b562431bc021a5.tar.gz emacs-37a3c7744cd360d7eb967fae90b562431bc021a5.zip | |
(Finsert_file_contents): Don't use
current_buffer->buffer_file_coding_system even if REPLACE is
non-nil. Call Qafter_insert_file_set_coding with the second arg
VISIT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c index 3ad87ebe667..a3bb5aab62e 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3861,10 +3861,6 @@ actually used. */) | |||
| 3861 | 3861 | ||
| 3862 | if (!NILP (Vcoding_system_for_read)) | 3862 | if (!NILP (Vcoding_system_for_read)) |
| 3863 | val = Vcoding_system_for_read; | 3863 | val = Vcoding_system_for_read; |
| 3864 | else if (! NILP (replace)) | ||
| 3865 | /* In REPLACE mode, we can use the same coding system | ||
| 3866 | that was used to visit the file. */ | ||
| 3867 | val = current_buffer->buffer_file_coding_system; | ||
| 3868 | else | 3864 | else |
| 3869 | { | 3865 | { |
| 3870 | /* Don't try looking inside a file for a coding system | 3866 | /* Don't try looking inside a file for a coding system |
| @@ -4643,7 +4639,8 @@ actually used. */) | |||
| 4643 | 4639 | ||
| 4644 | if (! NILP (Ffboundp (Qafter_insert_file_set_coding))) | 4640 | if (! NILP (Ffboundp (Qafter_insert_file_set_coding))) |
| 4645 | { | 4641 | { |
| 4646 | insval = call1 (Qafter_insert_file_set_coding, make_number (inserted)); | 4642 | insval = call2 (Qafter_insert_file_set_coding, make_number (inserted), |
| 4643 | visit); | ||
| 4647 | if (! NILP (insval)) | 4644 | if (! NILP (insval)) |
| 4648 | { | 4645 | { |
| 4649 | CHECK_NUMBER (insval); | 4646 | CHECK_NUMBER (insval); |