# HG changeset patch # User Kenichi Handa # Date 868237184 0 # Node ID 72b27986e71d126f8cd91af4dba7b6529e695429 # Parent 9537741e70454fe91807eb10f8e6dfb047171f70 (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. diff -r 9537741e7045 -r 72b27986e71d src/fileio.c --- a/src/fileio.c Mon Jul 07 00:59:44 1997 +0000 +++ b/src/fileio.c Mon Jul 07 00:59:44 1997 +0000 @@ -3063,10 +3063,13 @@ /* 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 @@ { 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 {