diff options
author | Kenichi Handa <handa@m17n.org> | 1997-07-07 00:59:44 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-07-07 00:59:44 +0000 |
commit | 37c707cf39b69d291067f073826b89f23d3c6246 (patch) | |
tree | a6070bfae27cfe3c81c1ffaf8209f5faef1bc74e /src | |
parent | 4a90c630e0b03aaf4a1b3def8b758687247dec8b (diff) | |
download | emacs-37c707cf39b69d291067f073826b89f23d3c6246.tar.gz |
(Finsert_file_contents): If enable-multibyte-characters
is nil, decode character code by emacs-mule.
(Fwrite_region): Use buffer-file-coding-system for encoding if
enable-multibyte-characters is nil.
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c index c397cd0f474..1526015921a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3063,10 +3063,13 @@ This does code conversion according to the value of\n\ /* Decide the coding-system of the file. */ { - Lisp_Object val = Vcoding_system_for_read; - if (NILP (current_buffer->enable_multibyte_characters)) - val = Qnil; - else if (NILP (val)) + Lisp_Object val; + + if (!NILP (Vcoding_system_for_read)) + val = Vcoding_system_for_read; + else if (NILP (current_buffer->enable_multibyte_characters)) + val = Qemacs_mule; + else { Lisp_Object args[6], coding_systems; @@ -3806,12 +3809,13 @@ to the file, instead of any buffer contents, and END is ignored.") { Lisp_Object val; - if (auto_saving || NILP (current_buffer->enable_multibyte_characters)) + if (auto_saving) val = Qnil; else if (!NILP (Vcoding_system_for_write)) val = Vcoding_system_for_write; - else if (!NILP (Flocal_variable_if_set_p (Qbuffer_file_coding_system, - Qnil))) + else if (NILP (current_buffer->enable_multibyte_characters) + || !NILP (Flocal_variable_if_set_p (Qbuffer_file_coding_system, + Qnil))) val = Fsymbol_value (Qbuffer_file_coding_system); else { |