From: Kenichi Handa Date: Thu, 25 May 2000 04:44:33 +0000 (+0000) Subject: (run_pre_post_conversion_on_str): Set point to the X-Git-Tag: emacs-pretest-21.0.90~3730 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6bac5b12e8711e4bfa5a69533869cabe9c633b67;p=emacs.git (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. --- 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) if (encodep) call2 (coding->pre_write_conversion, make_number (BEG), make_number (Z)); else - call1 (coding->post_read_conversion, make_number (Z - BEG)); + { + TEMP_SET_PT_BOTH (BEG, BEG_BYTE); + call1 (coding->post_read_conversion, make_number (Z - BEG)); + } inhibit_pre_post_conversion = 0; str = make_buffer_string (BEG, Z, 0); return unbind_to (count, str); @@ -5110,7 +5113,7 @@ decode_coding_string (str, coding, nocopy) if (SYMBOLP (coding->post_read_conversion) && !NILP (Ffboundp (coding->post_read_conversion))) - str = run_pre_post_conversion_on_str (str, 0); + str = run_pre_post_conversion_on_str (str, coding, 0); return str; } @@ -5130,7 +5133,7 @@ encode_coding_string (str, coding, nocopy) if (SYMBOLP (coding->pre_write_conversion) && !NILP (Ffboundp (coding->pre_write_conversion))) - str = run_pre_post_conversion_on_str (str, 1); + str = run_pre_post_conversion_on_str (str, coding, 1); from = 0; to = XSTRING (str)->size;