diff options
| author | Kenichi Handa | 2000-05-29 12:52:44 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-05-29 12:52:44 +0000 |
| commit | 2d89215071c9b991d3db383504a7f23c74650ff1 (patch) | |
| tree | cf4ae82c9d071f6b255aeb10d72f3547cd0d2a5a /src | |
| parent | 80c05bd333ae5fefe928261897bbe3b866026f09 (diff) | |
| download | emacs-2d89215071c9b991d3db383504a7f23c74650ff1.tar.gz emacs-2d89215071c9b991d3db383504a7f23c74650ff1.zip | |
(Fcall_process): Fix previous change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/callproc.c b/src/callproc.c index 046c14a9b40..e852d3de769 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -730,7 +730,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 730 | saved_coding = process_coding; | 730 | saved_coding = process_coding; |
| 731 | if (process_coding.composing != COMPOSITION_DISABLED) | 731 | if (process_coding.composing != COMPOSITION_DISABLED) |
| 732 | coding_allocate_composition_data (&process_coding, PT); | 732 | coding_allocate_composition_data (&process_coding, PT); |
| 733 | |||
| 734 | while (1) | 733 | while (1) |
| 735 | { | 734 | { |
| 736 | /* Repeatedly read until we've filled as much as possible | 735 | /* Repeatedly read until we've filled as much as possible |
| @@ -773,6 +772,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 773 | repeat_decoding: | 772 | repeat_decoding: |
| 774 | size = decoding_buffer_size (&process_coding, nread); | 773 | size = decoding_buffer_size (&process_coding, nread); |
| 775 | decoding_buf = (char *) xmalloc (size); | 774 | decoding_buf = (char *) xmalloc (size); |
| 775 | if (process_coding.cmp_data) | ||
| 776 | process_coding.cmp_data->char_offset = PT; | ||
| 776 | decode_coding (&process_coding, bufptr, decoding_buf, | 777 | decode_coding (&process_coding, bufptr, decoding_buf, |
| 777 | nread, size); | 778 | nread, size); |
| 778 | if (display_on_the_fly | 779 | if (display_on_the_fly |
| @@ -790,13 +791,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 790 | continue; | 791 | continue; |
| 791 | } | 792 | } |
| 792 | if (process_coding.produced > 0) | 793 | if (process_coding.produced > 0) |
| 793 | { | 794 | insert_1_both (decoding_buf, process_coding.produced_char, |
| 794 | insert_1_both (decoding_buf, process_coding.produced_char, | 795 | process_coding.produced, 0, 1, 0); |
| 795 | process_coding.produced, 0, 1, 0); | ||
| 796 | if (process_coding.cmp_data) | ||
| 797 | coding_restore_composition (&process_coding, | ||
| 798 | Fcurrent_buffer ()); | ||
| 799 | } | ||
| 800 | xfree (decoding_buf); | 796 | xfree (decoding_buf); |
| 801 | nread -= process_coding.consumed; | 797 | nread -= process_coding.consumed; |
| 802 | carryover = nread; | 798 | carryover = nread; |
| @@ -810,7 +806,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 810 | /* The decoding ended because of insufficient data | 806 | /* The decoding ended because of insufficient data |
| 811 | area to record information about composition. | 807 | area to record information about composition. |
| 812 | We must try decoding with additional data area | 808 | We must try decoding with additional data area |
| 813 | before reading process output. */ | 809 | before reading more output for the process. */ |
| 814 | coding_allocate_composition_data (&process_coding, PT); | 810 | coding_allocate_composition_data (&process_coding, PT); |
| 815 | goto repeat_decoding; | 811 | goto repeat_decoding; |
| 816 | } | 812 | } |
| @@ -840,8 +836,12 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 840 | } | 836 | } |
| 841 | give_up: ; | 837 | give_up: ; |
| 842 | 838 | ||
| 843 | if (process_coding.cmp_data) | 839 | if (!NILP (buffer) |
| 844 | coding_free_composition_data (&process_coding); | 840 | && process_coding.cmp_data) |
| 841 | { | ||
| 842 | coding_restore_composition (&process_coding, Fcurrent_buffer ()); | ||
| 843 | coding_free_composition_data (&process_coding); | ||
| 844 | } | ||
| 845 | 845 | ||
| 846 | Vlast_coding_system_used = process_coding.symbol; | 846 | Vlast_coding_system_used = process_coding.symbol; |
| 847 | 847 | ||