diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-12-13 19:56:27 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-12-13 19:56:27 +0200 |
commit | 25e461c1c82656ae729b99a7b51b548d0c761304 (patch) | |
tree | 406dd3f4b5972c3418b9fa01fc0f114c3fb4f4de /src | |
parent | 93b106794966c5fd75281fa576da5ea534115273 (diff) | |
download | emacs-25e461c1c82656ae729b99a7b51b548d0c761304.tar.gz emacs-25e461c1c82656ae729b99a7b51b548d0c761304.tar.bz2 emacs-25e461c1c82656ae729b99a7b51b548d0c761304.zip |
Fix visiting files with raw-text
* src/fileio.c (Finsert_file_contents): Fix setting buffer unibyte
when some stuff was actually read. (Bug#22162)
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 5 |
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)); |