summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 8e44eb0d539..210383ff77a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4265,7 +4265,10 @@ by calling `format-decode', which see. */)
&& NILP (replace))
/* Visiting a file with these coding system makes the buffer
unibyte. */
- Fset_buffer_multibyte (Qnil);
+ if (inserted > 0)
+ bset_enable_multibyte_characters (current_buffer, Qnil);
+ else
+ Fset_buffer_multibyte (Qnil);
}
coding.dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));