diff options
| author | Kenichi Handa | 1997-07-07 00:59:44 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-07-07 00:59:44 +0000 |
| commit | cbc64b2ac640f716f81b2aaf1a64b808ab060414 (patch) | |
| tree | 0b14a215d1e7ab1a5ff18182dff27d72727ae0ed /src | |
| parent | 1348f1a4fc6ec6cee9c193c89f103fdb614bc847 (diff) | |
| download | emacs-cbc64b2ac640f716f81b2aaf1a64b808ab060414.tar.gz emacs-cbc64b2ac640f716f81b2aaf1a64b808ab060414.zip | |
(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\ | |||
| 3063 | 3063 | ||
| 3064 | /* Decide the coding-system of the file. */ | 3064 | /* Decide the coding-system of the file. */ |
| 3065 | { | 3065 | { |
| 3066 | Lisp_Object val = Vcoding_system_for_read; | 3066 | Lisp_Object val; |
| 3067 | if (NILP (current_buffer->enable_multibyte_characters)) | 3067 | |
| 3068 | val = Qnil; | 3068 | if (!NILP (Vcoding_system_for_read)) |
| 3069 | else if (NILP (val)) | 3069 | val = Vcoding_system_for_read; |
| 3070 | else if (NILP (current_buffer->enable_multibyte_characters)) | ||
| 3071 | val = Qemacs_mule; | ||
| 3072 | else | ||
| 3070 | { | 3073 | { |
| 3071 | Lisp_Object args[6], coding_systems; | 3074 | Lisp_Object args[6], coding_systems; |
| 3072 | 3075 | ||
| @@ -3806,12 +3809,13 @@ to the file, instead of any buffer contents, and END is ignored.") | |||
| 3806 | { | 3809 | { |
| 3807 | Lisp_Object val; | 3810 | Lisp_Object val; |
| 3808 | 3811 | ||
| 3809 | if (auto_saving || NILP (current_buffer->enable_multibyte_characters)) | 3812 | if (auto_saving) |
| 3810 | val = Qnil; | 3813 | val = Qnil; |
| 3811 | else if (!NILP (Vcoding_system_for_write)) | 3814 | else if (!NILP (Vcoding_system_for_write)) |
| 3812 | val = Vcoding_system_for_write; | 3815 | val = Vcoding_system_for_write; |
| 3813 | else if (!NILP (Flocal_variable_if_set_p (Qbuffer_file_coding_system, | 3816 | else if (NILP (current_buffer->enable_multibyte_characters) |
| 3814 | Qnil))) | 3817 | || !NILP (Flocal_variable_if_set_p (Qbuffer_file_coding_system, |
| 3818 | Qnil))) | ||
| 3815 | val = Fsymbol_value (Qbuffer_file_coding_system); | 3819 | val = Fsymbol_value (Qbuffer_file_coding_system); |
| 3816 | else | 3820 | else |
| 3817 | { | 3821 | { |