diff options
| author | Kenichi Handa | 2000-05-25 04:44:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-05-25 04:44:33 +0000 |
| commit | 6bac5b12e8711e4bfa5a69533869cabe9c633b67 (patch) | |
| tree | 6be2e38797f48d8beaaf94668e2dbc7e86b72517 /src/coding.c | |
| parent | 46ab33a9c7f034b87b347405a50c886ba313c4c7 (diff) | |
| download | emacs-6bac5b12e8711e4bfa5a69533869cabe9c633b67.tar.gz emacs-6bac5b12e8711e4bfa5a69533869cabe9c633b67.zip | |
(run_pre_post_conversion_on_str): Set point to the
beginning of buffer before calling coding->post_read_conversion.
(decode_coding_string): Give correct args to
run_pre_post_conversion_on_str.
(encode_coding_string): Likewise.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c index bf3b731a99e..a46f2692562 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -5000,7 +5000,10 @@ run_pre_post_conversion_on_str (str, coding, encodep) | |||
| 5000 | if (encodep) | 5000 | if (encodep) |
| 5001 | call2 (coding->pre_write_conversion, make_number (BEG), make_number (Z)); | 5001 | call2 (coding->pre_write_conversion, make_number (BEG), make_number (Z)); |
| 5002 | else | 5002 | else |
| 5003 | call1 (coding->post_read_conversion, make_number (Z - BEG)); | 5003 | { |
| 5004 | TEMP_SET_PT_BOTH (BEG, BEG_BYTE); | ||
| 5005 | call1 (coding->post_read_conversion, make_number (Z - BEG)); | ||
| 5006 | } | ||
| 5004 | inhibit_pre_post_conversion = 0; | 5007 | inhibit_pre_post_conversion = 0; |
| 5005 | str = make_buffer_string (BEG, Z, 0); | 5008 | str = make_buffer_string (BEG, Z, 0); |
| 5006 | return unbind_to (count, str); | 5009 | return unbind_to (count, str); |
| @@ -5110,7 +5113,7 @@ decode_coding_string (str, coding, nocopy) | |||
| 5110 | 5113 | ||
| 5111 | if (SYMBOLP (coding->post_read_conversion) | 5114 | if (SYMBOLP (coding->post_read_conversion) |
| 5112 | && !NILP (Ffboundp (coding->post_read_conversion))) | 5115 | && !NILP (Ffboundp (coding->post_read_conversion))) |
| 5113 | str = run_pre_post_conversion_on_str (str, 0); | 5116 | str = run_pre_post_conversion_on_str (str, coding, 0); |
| 5114 | 5117 | ||
| 5115 | return str; | 5118 | return str; |
| 5116 | } | 5119 | } |
| @@ -5130,7 +5133,7 @@ encode_coding_string (str, coding, nocopy) | |||
| 5130 | 5133 | ||
| 5131 | if (SYMBOLP (coding->pre_write_conversion) | 5134 | if (SYMBOLP (coding->pre_write_conversion) |
| 5132 | && !NILP (Ffboundp (coding->pre_write_conversion))) | 5135 | && !NILP (Ffboundp (coding->pre_write_conversion))) |
| 5133 | str = run_pre_post_conversion_on_str (str, 1); | 5136 | str = run_pre_post_conversion_on_str (str, coding, 1); |
| 5134 | 5137 | ||
| 5135 | from = 0; | 5138 | from = 0; |
| 5136 | to = XSTRING (str)->size; | 5139 | to = XSTRING (str)->size; |