aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-08-23 13:18:33 +0000
committerGerd Moellmann2001-08-23 13:18:33 +0000
commit1f83434377b127eca9a0296e983c7e4949974c15 (patch)
tree93c92980838291a11724898cd9d81700acba28ca /src
parent4063fff35d4b066e8f3205a57fca5582417e6d06 (diff)
downloademacs-1f83434377b127eca9a0296e983c7e4949974c15.tar.gz
emacs-1f83434377b127eca9a0296e983c7e4949974c15.zip
(Finsert_file_contents): If VISIT is non-nil, and
coding.type is coding_type_no_conversion or coding_type_raw_text, use Fset_buffer_multibyte to make the buffer unibyte if REPLACE is non-nil instead of just setting enable_multibyte_characters in the buffer to nil.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index a8edc2f75b7..271cee1a4f0 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4344,8 +4344,14 @@ actually used.")
4344 { 4344 {
4345 /* Visiting a file with these coding system always make the buffer 4345 /* Visiting a file with these coding system always make the buffer
4346 unibyte. */ 4346 unibyte. */
4347 current_buffer->enable_multibyte_characters = Qnil; 4347 if (!NILP (replace)
4348 coding.dst_multibyte = 0; 4348 && !NILP (current_buffer->enable_multibyte_characters))
4349 Fset_buffer_multibyte (Qnil);
4350 else
4351 {
4352 current_buffer->enable_multibyte_characters = Qnil;
4353 coding.dst_multibyte = 0;
4354 }
4349 } 4355 }
4350 4356
4351 if (inserted > 0 || coding.type == coding_type_ccl) 4357 if (inserted > 0 || coding.type == coding_type_ccl)