aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/fileio.c b/src/fileio.c
index cb983cc78d4..c5089cbe78d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4415,11 +4415,10 @@ actually used. */)
4415 /* Since we are sure that the current buffer was empty 4415 /* Since we are sure that the current buffer was empty
4416 before the insertion, we can toggle 4416 before the insertion, we can toggle
4417 enable-multibyte-characters directly here without taking 4417 enable-multibyte-characters directly here without taking
4418 care of marker adjustment and byte combining problem. By 4418 care of marker adjustment. By this way, we can run Lisp
4419 this way, we can run Lisp program safely before decoding 4419 program safely before decoding the inserted text. */
4420 the inserted text. */
4421 Lisp_Object unwind_data; 4420 Lisp_Object unwind_data;
4422 int count = SPECPDL_INDEX (); 4421 int count = SPECPDL_INDEX ();
4423 4422
4424 unwind_data = Fcons (current_buffer->enable_multibyte_characters, 4423 unwind_data = Fcons (current_buffer->enable_multibyte_characters,
4425 Fcons (current_buffer->undo_list, 4424 Fcons (current_buffer->undo_list,
@@ -4468,15 +4467,7 @@ actually used. */)
4468 if (!NILP (visit)) 4467 if (!NILP (visit))
4469 { 4468 {
4470 /* When we visit a file by raw-text, we change the buffer to 4469 /* When we visit a file by raw-text, we change the buffer to
4471 unibyte. If we have not yet decided how to decode a text, 4470 unibyte. */
4472 decide it at first by detecting the file's encoding. */
4473 if (CODING_REQUIRE_DETECTION (&coding))
4474 {
4475 coding_system = detect_coding_system (PT_ADDR, inserted, inserted,
4476 1, 0, coding_system);
4477 setup_coding_system (coding_system, &coding);
4478 }
4479
4480 if (CODING_FOR_UNIBYTE (&coding) 4471 if (CODING_FOR_UNIBYTE (&coding)
4481 /* Can't do this if part of the buffer might be preserved. */ 4472 /* Can't do this if part of the buffer might be preserved. */
4482 && NILP (replace)) 4473 && NILP (replace))