# HG changeset patch # User Kenichi Handa # Date 881640723 0 # Node ID 987ddd5cb6eed3f85234247006c1b8bcb17d6f49 # Parent 01f1baff05d3e8ea1695454b910293fa491d278a (Finsert_file_contents): Set Vlast_coding_system_used before calling Vafter_insert_file_functions. (Fwrite_region): Set Vlast_coding_system_used after deciding a coding system to be used for encoding. diff -r 01f1baff05d3 -r 987ddd5cb6ee src/fileio.c --- a/src/fileio.c Mon Dec 08 06:58:14 1997 +0000 +++ b/src/fileio.c Tue Dec 09 04:12:03 1997 +0000 @@ -3842,6 +3842,8 @@ && (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 @@ 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);