=== modified file 'src/xdisp.c' --- src/xdisp.c 2013-11-30 14:03:53 +0000 +++ src/xdisp.c 2013-11-30 16:04:59 +0000 @@ -13119,13 +13119,28 @@ } } -#define STOP_POLLING \ -do { if (! polling_stopped_here) stop_polling (); \ - polling_stopped_here = 1; } while (0) +#define STOP_POLLING \ +do { \ + if (! polling_stopped_here) stop_polling (); \ + polling_stopped_here = 1; \ + /* Prevent various kinds of signals during display \ + update. stdio is not robust about handling \ + signals, which can cause an apparent I/O error. */ \ + if (interrupt_input) \ + unrequest_sigio (); \ +} while (0) -#define RESUME_POLLING \ -do { if (polling_stopped_here) start_polling (); \ - polling_stopped_here = 0; } while (0) +#define RESUME_POLLING \ +do { \ + if (polling_stopped_here) start_polling (); \ + polling_stopped_here = 0; \ + /* Start SIGIO interrupts coming again. Having them off during the \ + code above makes it less likely one will discard output, but not \ + impossible, since there might be stuff in the system buffer here. \ + But it is much hairier to try to do anything about that. */ \ + if (interrupt_input) \ + request_sigio (); \ +} while (0) /* Perhaps in the future avoid recentering windows if it @@ -13627,11 +13642,6 @@ goto retry_frame; } - /* Prevent various kinds of signals during display - update. stdio is not robust about handling - signals, which can cause an apparent I/O error. */ - if (interrupt_input) - unrequest_sigio (); STOP_POLLING; pending |= update_frame (f, 0, 0); @@ -13684,11 +13694,6 @@ if (sf->fonts_changed) goto retry; - /* Prevent various kinds of signals during display update. - stdio is not robust about handling signals, - which can cause an apparent I/O error. */ - if (interrupt_input) - unrequest_sigio (); STOP_POLLING; if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) @@ -13761,12 +13766,6 @@ windows_or_buffers_changed = 0; } - /* Start SIGIO interrupts coming again. Having them off during the - code above makes it less likely one will discard output, but not - impossible, since there might be stuff in the system buffer here. - But it is much hairier to try to do anything about that. */ - if (interrupt_input) - request_sigio (); RESUME_POLLING; /* If a frame has become visible which was not before, redisplay @@ -13819,8 +13818,6 @@ #endif /* HAVE_WINDOW_SYSTEM */ end_of_redisplay: - if (interrupt_input && interrupts_deferred) - request_sigio (); unbind_to (count, Qnil); RESUME_POLLING;