# HG changeset patch # User Aidan Kehoe # Date 1427823741 -3600 # Node ID 31dd275fa683f7352df9cfe2fe6462037b53aaa9 # Parent 44ba043ceada060011d23581b81256527d6fcd9f Preserv the current buffer on non-local exit, #'accept-process-output. 2015-03-31 Aidan Kehoe * event-stream.c (Faccept_process_output): Restore the current buffer even on non-local exit in this function, none of the code that uses #'accept-process-output is actually prepared to handle the current buffer changing. diff -r 44ba043ceada -r 31dd275fa683 src/ChangeLog --- a/src/ChangeLog Sat Mar 28 16:03:33 2015 -0400 +++ b/src/ChangeLog Tue Mar 31 18:42:21 2015 +0100 @@ -1,3 +1,10 @@ +2015-03-31 Aidan Kehoe + + * event-stream.c (Faccept_process_output): + Restore the current buffer even on non-local exit in this + function, none of the code that uses #'accept-process-output is + actually prepared to handle the current buffer changing. + 2015-03-27 Vin Shelton * s/cygwin64.h: Fixed another stupid typo. diff -r 44ba043ceada -r 31dd275fa683 src/event-stream.c --- a/src/event-stream.c Sat Mar 28 16:03:33 2015 -0400 +++ b/src/event-stream.c Tue Mar 31 18:42:21 2015 +0100 @@ -2617,7 +2617,6 @@ int timeout_id = -1; int timeout_enabled = 0; int done = 0; - struct buffer *old_buffer = current_buffer; int count; /* We preserve the current buffer but nothing else. If a focus @@ -2654,6 +2653,7 @@ record_unwind_protect (sit_for_unwind, timeout_enabled ? make_fixnum (timeout_id) : Qnil); recursive_sit_for = 1; + record_unwind_protect (Fset_buffer, wrap_buffer (current_buffer)); while (!done && ((NILP (process) && timeout_enabled) || @@ -2723,7 +2723,7 @@ status_notify (); UNGCPRO; - current_buffer = old_buffer; + return result; }