# HG changeset patch # User Kenichi Handa # Date 1110542382 0 # Node ID ca116ec246d76218da5313ad541f4b4bb61f100f # Parent 231ce7de960a0ffb2f9b8bf34805db01e4ee6dbb (Finsert_file_contents): Call Fcheck_coding_system before calling setup_coding_system so that autoloading of a coding system work. diff -r 231ce7de960a -r ca116ec246d7 src/fileio.c --- a/src/fileio.c Fri Mar 11 02:04:21 2005 +0000 +++ b/src/fileio.c Fri Mar 11 11:59:42 2005 +0000 @@ -4503,12 +4503,12 @@ this way, we can run Lisp program safely before decoding the inserted text. */ Lisp_Object unwind_data; - int count = SPECPDL_INDEX (); + int count = SPECPDL_INDEX (); unwind_data = Fcons (current_buffer->enable_multibyte_characters, Fcons (current_buffer->undo_list, Fcurrent_buffer ())); - current_buffer->enable_multibyte_characters = Qnil; + current_buffer->enable_multibyte_characters = Qnil; current_buffer->undo_list = Qt; record_unwind_protect (decide_coding_unwind, unwind_data); @@ -4530,7 +4530,6 @@ if (CONSP (coding_systems)) val = XCAR (coding_systems); } - unbind_to (count, Qnil); inserted = Z_BYTE - BEG_BYTE; } @@ -4541,7 +4540,7 @@ on some system. */ { struct coding_system temp_coding; - setup_coding_system (val, &temp_coding); + setup_coding_system (Fcheck_coding_system (val), &temp_coding); bcopy (&temp_coding, &coding, sizeof coding); } /* Ensure we set Vlast_coding_system_used. */