(syms_of_keyboard): Set up Qpolling_period.
authorRichard M. Stallman <rms@gnu.org>
Fri, 13 May 1994 08:32:16 +0000 (08:32 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 13 May 1994 08:32:16 +0000 (08:32 +0000)
(bind_polling_period): New function.

src/keyboard.c

index e32d901..958b865 100644 (file)
@@ -419,6 +419,8 @@ Lisp_Object recursive_edit_unwind (), command_loop ();
 Lisp_Object Fthis_command_keys ();
 Lisp_Object Qextended_command_history;
 
+Lisp_Object Qpolling_period;
+
 /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt
    happens.  */
 EMACS_TIME *input_available_clear_time;
@@ -1306,6 +1308,16 @@ set_poll_suppress_count (count)
   poll_suppress_count = count;
 #endif
 }
+
+bind_polling_period (n)
+     int n;
+{
+#ifdef POLL_FOR_INPUT
+  stop_polling ();
+  specbind (Qpolling_period, make_number (n));
+  start_polling ();
+#endif
+}
 \f
 /* Applying the control modifier to CHARACTER.  */
 int
@@ -5834,6 +5846,9 @@ syms_of_keyboard ()
   Qactivate_menubar_hook = intern ("activate-menubar-hook");
   staticpro (&Qactivate_menubar_hook);
 
+  Qpolling_period = intern ("polling-period");
+  staticpro (&Qpolling_period);
+
   {
     struct event_head *p;