diff options
| author | Kenichi Handa | 1998-02-20 01:40:47 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-02-20 01:40:47 +0000 |
| commit | 64e0ae2a6a50facd2fe5a7758c1cbbbb306ef7c0 (patch) | |
| tree | e27998c49cca888ee275118ba0c17ffe51670ffc | |
| parent | 0ab9dd767eb7bdcc912c69829b2f650ebfa25297 (diff) | |
| download | emacs-64e0ae2a6a50facd2fe5a7758c1cbbbb306ef7c0.tar.gz emacs-64e0ae2a6a50facd2fe5a7758c1cbbbb306ef7c0.zip | |
(Finsert_file_contents): Read a file contents into the
correct buffer (byte) position. Adjusted for the change of
code_convert_region.
| -rw-r--r-- | src/fileio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index 168858d9090..2a87adf6c29 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3728,7 +3728,7 @@ This does code conversion according to the value of\n\ | |||
| 3728 | /* Allow quitting out of the actual I/O. */ | 3728 | /* Allow quitting out of the actual I/O. */ |
| 3729 | immediate_quit = 1; | 3729 | immediate_quit = 1; |
| 3730 | QUIT; | 3730 | QUIT; |
| 3731 | this = read (fd, BYTE_POS_ADDR (PT + inserted - 1) + 1, trytry); | 3731 | this = read (fd, BYTE_POS_ADDR (PT_BYTE + inserted - 1) + 1, trytry); |
| 3732 | immediate_quit = 0; | 3732 | immediate_quit = 0; |
| 3733 | 3733 | ||
| 3734 | if (this <= 0) | 3734 | if (this <= 0) |
| @@ -3771,7 +3771,12 @@ This does code conversion according to the value of\n\ | |||
| 3771 | if (inserted > 0) | 3771 | if (inserted > 0) |
| 3772 | { | 3772 | { |
| 3773 | if (CODING_MAY_REQUIRE_DECODING (&coding)) | 3773 | if (CODING_MAY_REQUIRE_DECODING (&coding)) |
| 3774 | inserted = code_convert_region (PT, PT + inserted, &coding, 0, 0); | 3774 | { |
| 3775 | code_convert_region (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, | ||
| 3776 | &coding, 0, 0); | ||
| 3777 | inserted = (NILP (current_buffer->enable_multibyte_characters) | ||
| 3778 | ? coding.produced : coding.produced_char); | ||
| 3779 | } | ||
| 3775 | 3780 | ||
| 3776 | #ifdef DOS_NT | 3781 | #ifdef DOS_NT |
| 3777 | /* Use the conversion type to determine buffer-file-type | 3782 | /* Use the conversion type to determine buffer-file-type |