aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-12-09 04:12:03 +0000
committerKenichi Handa1997-12-09 04:12:03 +0000
commitb56567b5fd40f178124fee6a69adf43eda89002b (patch)
tree423f47bf9192eee8cef09296a70650c6d89edf99
parentee1125672014eb8a4e31d35f23ad3e7fd3a1820d (diff)
downloademacs-b56567b5fd40f178124fee6a69adf43eda89002b.tar.gz
emacs-b56567b5fd40f178124fee6a69adf43eda89002b.zip
(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.
-rw-r--r--src/fileio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 075e9db4e99..2cf1693200c 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3842,6 +3842,8 @@ This does code conversion according to the value of\n\
3842 && (NILP (visit) || !NILP (replace))) 3842 && (NILP (visit) || !NILP (replace)))
3843 signal_after_change (PT, 0, inserted); 3843 signal_after_change (PT, 0, inserted);
3844 3844
3845 Vlast_coding_system_used = coding.symbol;
3846
3845 if (inserted > 0) 3847 if (inserted > 0)
3846 { 3848 {
3847 p = Vafter_insert_file_functions; 3849 p = Vafter_insert_file_functions;
@@ -4000,6 +4002,8 @@ to the file, instead of any buffer contents, and END is ignored.")
4000 coding.selective = 1; 4002 coding.selective = 1;
4001 } 4003 }
4002 4004
4005 Vlast_coding_system_used = coding.symbol;
4006
4003 filename = Fexpand_file_name (filename, Qnil); 4007 filename = Fexpand_file_name (filename, Qnil);
4004 if (STRINGP (visit)) 4008 if (STRINGP (visit))
4005 visit_file = Fexpand_file_name (visit, Qnil); 4009 visit_file = Fexpand_file_name (visit, Qnil);