aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorStefan Monnier2010-04-11 12:15:09 -0400
committerStefan Monnier2010-04-11 12:15:09 -0400
commit97e53006f6c56bcbe190c56dadb350759644bfaa (patch)
tree8fa7b30b63525b5953e173d1e16f47ff50de697b /src/process.c
parent3a4fa2f208236104db1bab0c1c76e0bffd7955c1 (diff)
downloademacs-97e53006f6c56bcbe190c56dadb350759644bfaa.tar.gz
emacs-97e53006f6c56bcbe190c56dadb350759644bfaa.zip
* process.c (exec_sentinel): Preserve current-buffer.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c
index 69cd0d99c8a..4a1f31f66e7 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6840,6 +6840,11 @@ exec_sentinel (proc, reason)
6840 XSETBUFFER (obuffer, current_buffer); 6840 XSETBUFFER (obuffer, current_buffer);
6841 okeymap = current_buffer->keymap; 6841 okeymap = current_buffer->keymap;
6842 6842
6843 /* There's no good reason to let sentinels change the current
6844 buffer, and many callers of accept-process-output, sit-for, and
6845 friends don't expect current-buffer to be changed from under them. */
6846 record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
6847
6843 sentinel = p->sentinel; 6848 sentinel = p->sentinel;
6844 if (NILP (sentinel)) 6849 if (NILP (sentinel))
6845 return; 6850 return;