diff options
| author | Kenichi Handa | 2002-03-05 00:09:15 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-03-05 00:09:15 +0000 |
| commit | 1c157f8ddc376ed384e7c990c80de72dea23bd3e (patch) | |
| tree | bdc34f1da7754021c205c48cb945a132863d8fed /src | |
| parent | 0be8721c15d288d1977291469fa3f12cdd527cc0 (diff) | |
| download | emacs-1c157f8ddc376ed384e7c990c80de72dea23bd3e.tar.gz emacs-1c157f8ddc376ed384e7c990c80de72dea23bd3e.zip | |
(Finsert_file_contents): Set coding_system to Qnil
earlier. If inserted is zero and the coding system doesn't
require flushing, don't call decode_coding_gap.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c index 529722ded82..eb12810eeaa 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3594,6 +3594,10 @@ actually used. */) | |||
| 3594 | CHECK_STRING (filename); | 3594 | CHECK_STRING (filename); |
| 3595 | filename = Fexpand_file_name (filename, Qnil); | 3595 | filename = Fexpand_file_name (filename, Qnil); |
| 3596 | 3596 | ||
| 3597 | /* The value Qnil means that the coding system is not yet | ||
| 3598 | decided. */ | ||
| 3599 | coding_system = Qnil; | ||
| 3600 | |||
| 3597 | /* If the file name has special constructs in it, | 3601 | /* If the file name has special constructs in it, |
| 3598 | call the corresponding file handler. */ | 3602 | call the corresponding file handler. */ |
| 3599 | handler = Ffind_file_name_handler (filename, Qinsert_file_contents); | 3603 | handler = Ffind_file_name_handler (filename, Qinsert_file_contents); |
| @@ -3713,9 +3717,6 @@ actually used. */) | |||
| 3713 | } | 3717 | } |
| 3714 | } | 3718 | } |
| 3715 | 3719 | ||
| 3716 | /* The value Qnil means that the coding system is not yet | ||
| 3717 | decided. */ | ||
| 3718 | coding_system = Qnil; | ||
| 3719 | if (BEG < Z) | 3720 | if (BEG < Z) |
| 3720 | { | 3721 | { |
| 3721 | /* Decide the coding system to use for reading the file now | 3722 | /* Decide the coding system to use for reading the file now |
| @@ -4405,8 +4406,9 @@ actually used. */) | |||
| 4405 | current_buffer->enable_multibyte_characters = Qnil; | 4406 | current_buffer->enable_multibyte_characters = Qnil; |
| 4406 | } | 4407 | } |
| 4407 | 4408 | ||
| 4408 | if (CODING_REQUIRE_DETECTION (&coding) | 4409 | if ((CODING_REQUIRE_DETECTION (&coding) |
| 4409 | || CODING_REQUIRE_DECODING (&coding)) | 4410 | || CODING_REQUIRE_DECODING (&coding)) |
| 4411 | && (inserted > 0 || CODING_REQUIRE_FLUSHING (&coding))) | ||
| 4410 | { | 4412 | { |
| 4411 | move_gap_both (PT, PT_BYTE); | 4413 | move_gap_both (PT, PT_BYTE); |
| 4412 | GAP_SIZE += inserted; | 4414 | GAP_SIZE += inserted; |