aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2002-05-07 04:50:09 +0000
committerKenichi Handa2002-05-07 04:50:09 +0000
commitea99bcc1c79f6ec893bf5b7558541b94cff281fe (patch)
tree19cf07a19a500b81698b14fd2587a618d0b30be5
parent31285a8f59900b0e80120448384e4f12312212cc (diff)
downloademacs-ea99bcc1c79f6ec893bf5b7558541b94cff281fe.tar.gz
emacs-ea99bcc1c79f6ec893bf5b7558541b94cff281fe.zip
(Fcall_process): Be sure to give the current buffer
to decode_coding_c_string. Update PT and PT_BYTE after the insertion.
-rw-r--r--src/callproc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c
index bb3df43d433..9fa97d862c1 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -770,8 +770,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
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))
@@ -793,6 +796,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
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)