comparison src/fileio.c @ 39007:f3d3950ed951

(Finsert_file_contents): Undo change of 2001-08-27.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 29 Aug 2001 10:31:51 +0000
parents 64125d607a06
children c0daac54d3e1
comparison
equal deleted inserted replaced
39006:47ac337b9bde 39007:f3d3950ed951
4348 if (!NILP (visit) 4348 if (!NILP (visit)
4349 && (coding.type == coding_type_no_conversion 4349 && (coding.type == coding_type_no_conversion
4350 || coding.type == coding_type_raw_text)) 4350 || coding.type == coding_type_raw_text))
4351 { 4351 {
4352 /* Visiting a file with these coding systems should always make 4352 /* Visiting a file with these coding systems should always make
4353 the buffer unibyte. The call to Fset_buffer_multibyte 4353 the buffer unibyte. If we happen to be replacing text in a
4354 ensures that existing markers etc are converted to unibyte, 4354 multibyte buffer (this happens when reverting an RMAIL
4355 too. */ 4355 buffer), positions in the buffer, markers etc. may have byte
4356 Fset_buffer_multibyte (Qnil); 4356 positions != character positions, so just setting
4357 enable_multibyte_characters to nil doesn't suffice. */
4358 if (!NILP (replace)
4359 && !NILP (current_buffer->enable_multibyte_characters))
4360 Fset_buffer_multibyte (Qnil);
4361 else
4362 /* We cannot Fset_buffer_multibyte(nil) here. When we visit a
4363 file literally in a multibyte buffer, a call to
4364 Fset_buffer_multibyte would change character positions,
4365 although the buffer has unibyte contents, and that's wrong,
4366 of course. */
4367 current_buffer->enable_multibyte_characters = Qnil;
4357 coding.dst_multibyte = 0; 4368 coding.dst_multibyte = 0;
4358 } 4369 }
4359 4370
4360 if (inserted > 0 || coding.type == coding_type_ccl) 4371 if (inserted > 0 || coding.type == coding_type_ccl)
4361 { 4372 {