diff src/process.c @ 108164:745e12b5af4a

Don't burp if process sentinel/filter kills the current buffer. * process.c (read_process_output, exec_sentinel): Don't burp if the sentinel/filter kills the current buffer.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 29 Apr 2010 10:29:09 -0400
parents e8ea73860300
children 06c34f190db1
line wrap: on
line diff
--- a/src/process.c	Thu Apr 29 16:23:12 2010 +0200
+++ b/src/process.c	Thu Apr 29 10:29:09 2010 -0400
@@ -5396,7 +5396,7 @@
   /* There's no good reason to let process filters change the current
      buffer, and many callers of accept-process-output, sit-for, and
      friends don't expect current-buffer to be changed from under them.  */
-  record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
+  record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
 
   /* Read and dispose of the process output.  */
   outstream = p->filter;
@@ -6814,7 +6814,7 @@
   /* There's no good reason to let sentinels change the current
      buffer, and many callers of accept-process-output, sit-for, and
      friends don't expect current-buffer to be changed from under them.  */
-  record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
+  record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
 
   sentinel = p->sentinel;
   if (NILP (sentinel))