(Finsert_file_contents): Set Vlast_coding_system_used
authorKenichi Handa <handa@m17n.org>
Tue, 9 Dec 1997 04:12:03 +0000 (04:12 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 9 Dec 1997 04:12:03 +0000 (04:12 +0000)
before calling Vafter_insert_file_functions.
(Fwrite_region): Set Vlast_coding_system_used after deciding a
coding system to be used for encoding.

src/fileio.c

index 075e9db..2cf1693 100644 (file)
@@ -3842,6 +3842,8 @@ This does code conversion according to the value of\n\
       && (NILP (visit) || !NILP (replace)))
     signal_after_change (PT, 0, inserted);
 
+  Vlast_coding_system_used = coding.symbol;
+
   if (inserted > 0)
     {
       p = Vafter_insert_file_functions;
@@ -4000,6 +4002,8 @@ to the file, instead of any buffer contents, and END is ignored.")
       coding.selective = 1;
   }
 
+  Vlast_coding_system_used = coding.symbol;
+
   filename = Fexpand_file_name (filename, Qnil);
   if (STRINGP (visit))
     visit_file = Fexpand_file_name (visit, Qnil);