comparison 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
comparison
equal deleted inserted replaced
108163:ee8e46e5ac6d 108164:745e12b5af4a
5394 5394
5395 odeactivate = Vdeactivate_mark; 5395 odeactivate = Vdeactivate_mark;
5396 /* There's no good reason to let process filters change the current 5396 /* There's no good reason to let process filters change the current
5397 buffer, and many callers of accept-process-output, sit-for, and 5397 buffer, and many callers of accept-process-output, sit-for, and
5398 friends don't expect current-buffer to be changed from under them. */ 5398 friends don't expect current-buffer to be changed from under them. */
5399 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); 5399 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
5400 5400
5401 /* Read and dispose of the process output. */ 5401 /* Read and dispose of the process output. */
5402 outstream = p->filter; 5402 outstream = p->filter;
5403 if (!NILP (outstream)) 5403 if (!NILP (outstream))
5404 { 5404 {
6812 okeymap = current_buffer->keymap; 6812 okeymap = current_buffer->keymap;
6813 6813
6814 /* There's no good reason to let sentinels change the current 6814 /* There's no good reason to let sentinels change the current
6815 buffer, and many callers of accept-process-output, sit-for, and 6815 buffer, and many callers of accept-process-output, sit-for, and
6816 friends don't expect current-buffer to be changed from under them. */ 6816 friends don't expect current-buffer to be changed from under them. */
6817 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); 6817 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
6818 6818
6819 sentinel = p->sentinel; 6819 sentinel = p->sentinel;
6820 if (NILP (sentinel)) 6820 if (NILP (sentinel))
6821 return; 6821 return;
6822 6822