aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c32
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
4This file is part of GNU Emacs. 4This 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. */