Mercurial > emacs
changeset 18647:72b27986e71d
(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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 07 Jul 1997 00:59:44 +0000 |
parents | 9537741e7045 |
children | 5deb269b970f |
files | src/fileio.c |
diffstat | 1 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 {