From: Richard M. Stallman Date: Fri, 6 Aug 1993 21:17:16 +0000 (+0000) Subject: (Fset_input_mode): Start polling, if appropriate. X-Git-Tag: emacs-19.34~11380 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=34f04431e23606bd0e0250a05ac211c2fc12df68;p=emacs.git (Fset_input_mode): Start polling, if appropriate. At the beginning, stop polling. Remove period from error message. (stop_polling, start_polling): Check for interrupt_input. (POLL_FOR_INPUT): Define whether or not target supports SIGIO. --- diff --git a/src/keyboard.c b/src/keyboard.c index c8e9e824b34..b0534f1dd1f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -430,13 +430,11 @@ int flow_control; #endif #endif -/* If we support X Windows, and won't get an interrupt when input - arrives from the server, poll periodically so we can detect C-g. */ +/* If we support X Windows, turn on the code to poll periodically + to detect C-g. It isn't actually used when doing interrupt input. */ #ifdef HAVE_X_WINDOWS -#ifndef SIGIO #define POLL_FOR_INPUT #endif -#endif /* Global variable declarations. */ @@ -1231,7 +1229,7 @@ input_poll_signal () start_polling () { #ifdef POLL_FOR_INPUT - if (read_socket_hook) + if (read_socket_hook && !interrupt_input) { poll_suppress_count--; if (poll_suppress_count == 0) @@ -1249,7 +1247,7 @@ start_polling () stop_polling () { #ifdef POLL_FOR_INPUT - if (read_socket_hook) + if (read_socket_hook && !interrupt_input) { if (poll_suppress_count == 0) { @@ -4932,7 +4930,11 @@ See also `current-input-mode'.") if (!NILP (quit) && (XTYPE (quit) != Lisp_Int || XINT (quit) < 0 || XINT (quit) > 0400)) - error ("set-input-mode: QUIT must be an ASCII character."); + error ("set-input-mode: QUIT must be an ASCII character"); + +#ifdef POLL_FOR_INPUT + stop_polling (); +#endif reset_sys_modes (); #ifdef SIGIO @@ -4962,6 +4964,11 @@ See also `current-input-mode'.") quit_char = XINT (quit) & (meta_key ? 0377 : 0177); init_sys_modes (); + +#ifdef POLL_FOR_INPUT + poll_suppress_count = 1; + start_polling (); +#endif return Qnil; }