diff options
| author | Eli Zaretskii | 2015-12-13 19:56:27 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-12-13 19:56:27 +0200 |
| commit | 25e461c1c82656ae729b99a7b51b548d0c761304 (patch) | |
| tree | 406dd3f4b5972c3418b9fa01fc0f114c3fb4f4de /src | |
| parent | 93b106794966c5fd75281fa576da5ea534115273 (diff) | |
| download | emacs-25e461c1c82656ae729b99a7b51b548d0c761304.tar.gz 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. */) | |||
| 4265 | && NILP (replace)) | 4265 | && NILP (replace)) |
| 4266 | /* Visiting a file with these coding system makes the buffer | 4266 | /* Visiting a file with these coding system makes the buffer |
| 4267 | unibyte. */ | 4267 | unibyte. */ |
| 4268 | Fset_buffer_multibyte (Qnil); | 4268 | if (inserted > 0) |
| 4269 | bset_enable_multibyte_characters (current_buffer, Qnil); | ||
| 4270 | else | ||
| 4271 | Fset_buffer_multibyte (Qnil); | ||
| 4269 | } | 4272 | } |
| 4270 | 4273 | ||
| 4271 | coding.dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 4274 | coding.dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); |