diff src/keyboard.c @ 109390:f1045a53471c

Merge from mainline.
author Katsumi Yamaoka <katsumi@flagship2>
date Wed, 14 Jul 2010 13:03:03 +0000
parents 4e99d7aa7526
children 68ca98ae70fb
line wrap: on
line diff
--- a/src/keyboard.c	Mon Jul 12 13:21:11 2010 +0000
+++ b/src/keyboard.c	Wed Jul 14 13:03:03 2010 +0000
@@ -3593,7 +3593,7 @@
 /* Return the number of slots occupied in kbd_buffer.  */
 
 static int
-kbd_buffer_nr_stored ()
+kbd_buffer_nr_stored (void)
 {
   return kbd_fetch_ptr == kbd_store_ptr
     ? 0
@@ -6901,18 +6901,15 @@
   event.frame_or_window = Qnil;
   event.arg = Qnil;
 
-#ifdef subprocesses
   /* We don't need a buffer-switch event unless Emacs is waiting for input.
      The purpose of the event is to make read_key_sequence look up the
      keymaps again.  If we aren't in read_key_sequence, we don't need one,
-     and the event could cause trouble by messing up (input-pending-p).  */
+     and the event could cause trouble by messing up (input-pending-p).
+     Note: Fwaiting_for_user_input_p always returns nil when async
+     subprocesses aren't supported.  */
   tem = Fwaiting_for_user_input_p ();
   if (NILP (tem))
     return;
-#else
-  /* We never need these events if we have no asynchronous subprocesses.  */
-  return;
-#endif
 
   /* Make sure no interrupt happens while storing the event.  */
 #ifdef SIGIO
@@ -11536,7 +11533,7 @@
   Lisp_Object *kind;
 };
 
-struct event_head head_table[] = {
+static const struct event_head head_table[] = {
   {&Qmouse_movement,      "mouse-movement",      &Qmouse_movement},
   {&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement},
   {&Qswitch_frame,        "switch-frame",        &Qswitch_frame},
@@ -11721,7 +11718,7 @@
   last_point_position_window = Qnil;
 
   {
-    struct event_head *p;
+    const struct event_head *p;
 
     for (p = head_table;
 	 p < head_table + (sizeof (head_table) / sizeof (head_table[0]));