aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c21
1 files changed, 14 insertions, 7 deletions
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;
430#endif 430#endif
431#endif 431#endif
432 432
433/* If we support X Windows, and won't get an interrupt when input 433/* If we support X Windows, turn on the code to poll periodically
434 arrives from the server, poll periodically so we can detect C-g. */ 434 to detect C-g. It isn't actually used when doing interrupt input. */
435#ifdef HAVE_X_WINDOWS 435#ifdef HAVE_X_WINDOWS
436#ifndef SIGIO
437#define POLL_FOR_INPUT 436#define POLL_FOR_INPUT
438#endif 437#endif
439#endif
440 438
441/* Global variable declarations. */ 439/* Global variable declarations. */
442 440
@@ -1231,7 +1229,7 @@ input_poll_signal ()
1231start_polling () 1229start_polling ()
1232{ 1230{
1233#ifdef POLL_FOR_INPUT 1231#ifdef POLL_FOR_INPUT
1234 if (read_socket_hook) 1232 if (read_socket_hook && !interrupt_input)
1235 { 1233 {
1236 poll_suppress_count--; 1234 poll_suppress_count--;
1237 if (poll_suppress_count == 0) 1235 if (poll_suppress_count == 0)
@@ -1249,7 +1247,7 @@ start_polling ()
1249stop_polling () 1247stop_polling ()
1250{ 1248{
1251#ifdef POLL_FOR_INPUT 1249#ifdef POLL_FOR_INPUT
1252 if (read_socket_hook) 1250 if (read_socket_hook && !interrupt_input)
1253 { 1251 {
1254 if (poll_suppress_count == 0) 1252 if (poll_suppress_count == 0)
1255 { 1253 {
@@ -4932,7 +4930,11 @@ See also `current-input-mode'.")
4932 if (!NILP (quit) 4930 if (!NILP (quit)
4933 && (XTYPE (quit) != Lisp_Int 4931 && (XTYPE (quit) != Lisp_Int
4934 || XINT (quit) < 0 || XINT (quit) > 0400)) 4932 || XINT (quit) < 0 || XINT (quit) > 0400))
4935 error ("set-input-mode: QUIT must be an ASCII character."); 4933 error ("set-input-mode: QUIT must be an ASCII character");
4934
4935#ifdef POLL_FOR_INPUT
4936 stop_polling ();
4937#endif
4936 4938
4937 reset_sys_modes (); 4939 reset_sys_modes ();
4938#ifdef SIGIO 4940#ifdef SIGIO
@@ -4962,6 +4964,11 @@ See also `current-input-mode'.")
4962 quit_char = XINT (quit) & (meta_key ? 0377 : 0177); 4964 quit_char = XINT (quit) & (meta_key ? 0377 : 0177);
4963 4965
4964 init_sys_modes (); 4966 init_sys_modes ();
4967
4968#ifdef POLL_FOR_INPUT
4969 poll_suppress_count = 1;
4970 start_polling ();
4971#endif
4965 return Qnil; 4972 return Qnil;
4966} 4973}
4967 4974