diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 18e0ce0b93b..0cc3e9d036e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2001-08-24 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * fileio.c (Finsert_file_contents): Set coding's dest_multibyte | ||
| 4 | to 0 also in the REPLACE case. | ||
| 5 | |||
| 1 | 2001-08-24 Andrew Choi <akochoi@cse.cuhk.edu.hk> | 6 | 2001-08-24 Andrew Choi <akochoi@cse.cuhk.edu.hk> |
| 2 | 7 | ||
| 3 | * fileio.c (Ffile_readable_p) [macintosh]: Call access instead of | 8 | * fileio.c (Ffile_readable_p) [macintosh]: Call access instead of |
diff --git a/src/fileio.c b/src/fileio.c index 0b33668ab5d..c9fe5834060 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4343,16 +4343,18 @@ actually used.") | |||
| 4343 | && (coding.type == coding_type_no_conversion | 4343 | && (coding.type == coding_type_no_conversion |
| 4344 | || coding.type == coding_type_raw_text)) | 4344 | || coding.type == coding_type_raw_text)) |
| 4345 | { | 4345 | { |
| 4346 | /* Visiting a file with these coding system always make the buffer | 4346 | /* Visiting a file with these coding systems should always make |
| 4347 | unibyte. */ | 4347 | the buffer unibyte. If we happen to be replacing text in a |
| 4348 | multibyte buffer (this happens when reverting an RMAIL | ||
| 4349 | buffer), positions in the buffer, markers etc. may have byte | ||
| 4350 | positions != character positions, so just setting | ||
| 4351 | enable_multibyte_characters to nil doesn't suffice. */ | ||
| 4348 | if (!NILP (replace) | 4352 | if (!NILP (replace) |
| 4349 | && !NILP (current_buffer->enable_multibyte_characters)) | 4353 | && !NILP (current_buffer->enable_multibyte_characters)) |
| 4350 | Fset_buffer_multibyte (Qnil); | 4354 | Fset_buffer_multibyte (Qnil); |
| 4351 | else | 4355 | else |
| 4352 | { | 4356 | current_buffer->enable_multibyte_characters = Qnil; |
| 4353 | current_buffer->enable_multibyte_characters = Qnil; | 4357 | coding.dst_multibyte = 0; |
| 4354 | coding.dst_multibyte = 0; | ||
| 4355 | } | ||
| 4356 | } | 4358 | } |
| 4357 | 4359 | ||
| 4358 | if (inserted > 0 || coding.type == coding_type_ccl) | 4360 | if (inserted > 0 || coding.type == coding_type_ccl) |