* process.c (exec_sentinel): Preserve current-buffer.
This commit is contained in:
parent
3a4fa2f208
commit
97e53006f6
2 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue