Commit 97e53006 authored by Stefan Monnier's avatar Stefan Monnier

* process.c (exec_sentinel): Preserve current-buffer.

parent 3a4fa2f2
2010-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
* process.c (exec_sentinel): Preserve current-buffer.
* process.c (read_process_output): Move the save-current-buffer to
apply to both the filter and the non-filter branches.
......
......@@ -6840,6 +6840,11 @@ exec_sentinel (proc, reason)
XSETBUFFER (obuffer, current_buffer);
okeymap = current_buffer->keymap;
/* 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 ());
sentinel = p->sentinel;
if (NILP (sentinel))
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment