diff options
| -rw-r--r-- | src/callproc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c index 0c9ce9a3a1c..a09649c639a 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -840,8 +840,14 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") val = Qnil; } - specbind (intern ("coding-system-for-write"), val); - Fwrite_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil); + { + int count1 = specpdl_ptr - specpdl; + + specbind (intern ("coding-system-for-write"), val); + Fwrite_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil); + + unbind_to (count1, Qnil); + } /* Note that Fcall_process takes care of binding coding-system-for-read. */ |
