From: Stefan Monnier Date: Thu, 29 Apr 2010 14:29:09 +0000 (-0400) Subject: Don't burp if process sentinel/filter kills the current buffer. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~343 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d2630aefd3b7b9b543dad2bb2f352238da67a933;p=emacs.git 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. Fixes: debbugs:6060 --- diff --git a/src/ChangeLog b/src/ChangeLog index 0f15ed95e0a..c24493293e8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2010-04-29 Stefan Monnier + * process.c (read_process_output, exec_sentinel): Don't burp if the + sentinel/filter kills the current buffer (bug#6060). + Fix wrong-docstring problem introduced with hash-consing. (Bug#6008) * eval.c (Fautoload): Set doc to a unique number rather than to 0. Remove unused var `args'. diff --git a/src/process.c b/src/process.c index 7e8f4cc57bc..29983b22858 100644 --- a/src/process.c +++ b/src/process.c @@ -5396,7 +5396,7 @@ read_process_output (proc, channel) /* 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 @@ exec_sentinel (proc, reason) /* 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))