diff options
| author | Kenichi Handa | 2000-08-09 07:51:57 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-08-09 07:51:57 +0000 |
| commit | 838c97260737dd10b00c6e95fcbbe65af5802272 (patch) | |
| tree | fe3c90b2903e226d2f9afda76841e14478d366bb /src | |
| parent | 2f2174fad16a7cefe880d505d386820c4304d273 (diff) | |
| download | emacs-838c97260737dd10b00c6e95fcbbe65af5802272.tar.gz emacs-838c97260737dd10b00c6e95fcbbe65af5802272.zip | |
(Fcall_process): Terminate the unwind-protect around the
post-read-conversion of coding system.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/callproc.c b/src/callproc.c index 103ece304bc..b29572bae0c 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Synchronous subprocess invocation for GNU Emacs. | 1 | /* Synchronous subprocess invocation for GNU Emacs. |
| 2 | Copyright (C) 1985, 86,87,88,93,94,95, 1999 Free Software Foundation, Inc. | 2 | Copyright (C) 1985,86,87,88,93,94,95,99,2000 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -846,20 +846,26 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 846 | coding_free_composition_data (&process_coding); | 846 | coding_free_composition_data (&process_coding); |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); | 849 | { |
| 850 | inserted = PT - pt_orig; | 850 | int post_read_count = specpdl_ptr - specpdl; |
| 851 | TEMP_SET_PT_BOTH (pt_orig, pt_byte_orig); | 851 | |
| 852 | if (SYMBOLP (process_coding.post_read_conversion) | 852 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); |
| 853 | && !NILP (Ffboundp (process_coding.post_read_conversion))) | 853 | inserted = PT - pt_orig; |
| 854 | call1 (process_coding.post_read_conversion, make_number (inserted)); | 854 | TEMP_SET_PT_BOTH (pt_orig, pt_byte_orig); |
| 855 | if (SYMBOLP (process_coding.post_read_conversion) | ||
| 856 | && !NILP (Ffboundp (process_coding.post_read_conversion))) | ||
| 857 | call1 (process_coding.post_read_conversion, make_number (inserted)); | ||
| 855 | 858 | ||
| 856 | Vlast_coding_system_used = process_coding.symbol; | 859 | Vlast_coding_system_used = process_coding.symbol; |
| 857 | 860 | ||
| 858 | /* If the caller required, let the buffer inherit the | 861 | /* If the caller required, let the buffer inherit the |
| 859 | coding-system used to decode the process output. */ | 862 | coding-system used to decode the process output. */ |
| 860 | if (inherit_process_coding_system) | 863 | if (inherit_process_coding_system) |
| 861 | call1 (intern ("after-insert-file-set-buffer-file-coding-system"), | 864 | call1 (intern ("after-insert-file-set-buffer-file-coding-system"), |
| 862 | make_number (total_read)); | 865 | make_number (total_read)); |
| 866 | |||
| 867 | unbind_to (post_read_count, Qnil); | ||
| 868 | } | ||
| 863 | } | 869 | } |
| 864 | 870 | ||
| 865 | /* Wait for it to terminate, unless it already has. */ | 871 | /* Wait for it to terminate, unless it already has. */ |