From 37a3c7744cd360d7eb967fae90b562431bc021a5 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 30 Dec 2004 12:28:41 +0000 Subject: [PATCH] (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. --- src/fileio.c | 7 ++----- 1 file 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. */) if (!NILP (Vcoding_system_for_read)) val = Vcoding_system_for_read; - else if (! NILP (replace)) - /* In REPLACE mode, we can use the same coding system - that was used to visit the file. */ - val = current_buffer->buffer_file_coding_system; else { /* Don't try looking inside a file for a coding system @@ -4643,7 +4639,8 @@ actually used. */) if (! NILP (Ffboundp (Qafter_insert_file_set_coding))) { - insval = call1 (Qafter_insert_file_set_coding, make_number (inserted)); + insval = call2 (Qafter_insert_file_set_coding, make_number (inserted), + visit); if (! NILP (insval)) { CHECK_NUMBER (insval); -- 2.39.5