diff options
| author | Kenichi Handa | 2005-03-11 11:59:42 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2005-03-11 11:59:42 +0000 |
| commit | 87e3d54cf95bd58c8bbdda8e8fdfa933e138ae5b (patch) | |
| tree | b4ffdcc1520783b4657b2e4c2cc640a6541e6381 /src/fileio.c | |
| parent | ac249c4c50c62ba4ca37e427866bbc6e074ad6f8 (diff) | |
| download | emacs-87e3d54cf95bd58c8bbdda8e8fdfa933e138ae5b.tar.gz emacs-87e3d54cf95bd58c8bbdda8e8fdfa933e138ae5b.zip | |
(Finsert_file_contents): Call Fcheck_coding_system
before calling setup_coding_system so that autoloading of a coding
system work.
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fileio.c b/src/fileio.c index 7f73a55bce9..2287025362a 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4503,12 +4503,12 @@ actually used. */) | |||
| 4503 | this way, we can run Lisp program safely before decoding | 4503 | this way, we can run Lisp program safely before decoding |
| 4504 | the inserted text. */ | 4504 | the inserted text. */ |
| 4505 | Lisp_Object unwind_data; | 4505 | Lisp_Object unwind_data; |
| 4506 | int count = SPECPDL_INDEX (); | 4506 | int count = SPECPDL_INDEX (); |
| 4507 | 4507 | ||
| 4508 | unwind_data = Fcons (current_buffer->enable_multibyte_characters, | 4508 | unwind_data = Fcons (current_buffer->enable_multibyte_characters, |
| 4509 | Fcons (current_buffer->undo_list, | 4509 | Fcons (current_buffer->undo_list, |
| 4510 | Fcurrent_buffer ())); | 4510 | Fcurrent_buffer ())); |
| 4511 | current_buffer->enable_multibyte_characters = Qnil; | 4511 | current_buffer->enable_multibyte_characters = Qnil; |
| 4512 | current_buffer->undo_list = Qt; | 4512 | current_buffer->undo_list = Qt; |
| 4513 | record_unwind_protect (decide_coding_unwind, unwind_data); | 4513 | record_unwind_protect (decide_coding_unwind, unwind_data); |
| 4514 | 4514 | ||
| @@ -4530,7 +4530,6 @@ actually used. */) | |||
| 4530 | if (CONSP (coding_systems)) | 4530 | if (CONSP (coding_systems)) |
| 4531 | val = XCAR (coding_systems); | 4531 | val = XCAR (coding_systems); |
| 4532 | } | 4532 | } |
| 4533 | |||
| 4534 | unbind_to (count, Qnil); | 4533 | unbind_to (count, Qnil); |
| 4535 | inserted = Z_BYTE - BEG_BYTE; | 4534 | inserted = Z_BYTE - BEG_BYTE; |
| 4536 | } | 4535 | } |
| @@ -4541,7 +4540,7 @@ actually used. */) | |||
| 4541 | on some system. */ | 4540 | on some system. */ |
| 4542 | { | 4541 | { |
| 4543 | struct coding_system temp_coding; | 4542 | struct coding_system temp_coding; |
| 4544 | setup_coding_system (val, &temp_coding); | 4543 | setup_coding_system (Fcheck_coding_system (val), &temp_coding); |
| 4545 | bcopy (&temp_coding, &coding, sizeof coding); | 4544 | bcopy (&temp_coding, &coding, sizeof coding); |
| 4546 | } | 4545 | } |
| 4547 | /* Ensure we set Vlast_coding_system_used. */ | 4546 | /* Ensure we set Vlast_coding_system_used. */ |