Mercurial > emacs
comparison src/callproc.c @ 88454:47b395dd6f2c
(Fcall_process): Be sure to give the current buffer
to decode_coding_c_string. Update PT and PT_BYTE after the
insertion.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 07 May 2002 04:50:09 +0000 |
parents | 5ace79aaf5ad |
children | 4c5bbf536647 |
comparison
equal
deleted
inserted
replaced
88453:4e78ee207f40 | 88454:47b395dd6f2c |
---|---|
768 { | 768 { |
769 if (! CODING_MAY_REQUIRE_DECODING (&process_coding)) | 769 if (! CODING_MAY_REQUIRE_DECODING (&process_coding)) |
770 insert_1_both (bufptr, nread, nread, 0, 1, 0); | 770 insert_1_both (bufptr, nread, nread, 0, 1, 0); |
771 else | 771 else |
772 { /* We have to decode the input. */ | 772 { /* We have to decode the input. */ |
773 Lisp_Object buf; | |
774 | |
775 XSETBUFFER (buf, current_buffer); | |
773 decode_coding_c_string (&process_coding, bufptr, nread, | 776 decode_coding_c_string (&process_coding, bufptr, nread, |
774 buffer); | 777 buf); |
775 if (display_on_the_fly | 778 if (display_on_the_fly |
776 && CODING_REQUIRE_DETECTION (&saved_coding) | 779 && CODING_REQUIRE_DETECTION (&saved_coding) |
777 && ! CODING_REQUIRE_DETECTION (&process_coding)) | 780 && ! CODING_REQUIRE_DETECTION (&process_coding)) |
778 { | 781 { |
779 /* We have detected some coding system. But, | 782 /* We have detected some coding system. But, |
791 process_coding = saved_coding; | 794 process_coding = saved_coding; |
792 carryover = nread; | 795 carryover = nread; |
793 continue; | 796 continue; |
794 } | 797 } |
795 | 798 |
799 TEMP_SET_PT_BOTH (PT + process_coding.produced_char, | |
800 PT_BYTE + process_coding.produced); | |
796 nread -= process_coding.consumed; | 801 nread -= process_coding.consumed; |
797 carryover = nread; | 802 carryover = nread; |
798 if (carryover > 0) | 803 if (carryover > 0) |
799 /* As CARRYOVER should not be that large, we had | 804 /* As CARRYOVER should not be that large, we had |
800 better avoid overhead of bcopy. */ | 805 better avoid overhead of bcopy. */ |