changeset 45803:9484de301252

Rename enum event_kind items.
author Pavel Janík <Pavel@Janik.cz>
date Thu, 13 Jun 2002 14:59:38 +0000
parents d4c9f3bd6dfa
children 863817d7e734
files src/keyboard.c src/macterm.c src/msdos.c src/termhooks.h src/w32menu.c src/w32term.c src/xmenu.c src/xsmfns.c src/xterm.c
diffstat 9 files changed, 138 insertions(+), 138 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/keyboard.c	Thu Jun 13 14:59:38 2002 +0000
@@ -505,7 +505,7 @@
    queue.  That way, they'll be dequeued as dead frames or windows,
    but still valid Lisp objects.
 
-   If kbd_buffer[i].kind != no_event, then
+   If kbd_buffer[i].kind != NO_EVENT, then
 
    AREF (kbd_buffer_gcpro, 2 * i) == kbd_buffer[i].frame_or_window.
    AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg.  */
@@ -3330,10 +3330,10 @@
 kbd_buffer_store_event (event)
      register struct input_event *event;
 {
-  if (event->kind == no_event)
+  if (event->kind == NO_EVENT)
     abort ();
 
-  if (event->kind == ascii_keystroke)
+  if (event->kind == ASCII_KEYSTROKE_EVENT)
     {
       register int c = event->code & 0377;
 
@@ -3366,7 +3366,7 @@
 
 		  if (event_to_kboard (sp) == kb)
 		    {
-		      sp->kind = no_event;
+		      sp->kind = NO_EVENT;
 		      sp->frame_or_window = Qnil;
 		      sp->arg = Qnil;
 		    }
@@ -3400,11 +3400,11 @@
 	  return;
 	}
     }
-  /* Don't insert two buffer_switch_event's in a row.
+  /* Don't insert two BUFFER_SWITCH_EVENT's in a row.
      Just ignore the second one.  */
-  else if (event->kind == buffer_switch_event
+  else if (event->kind == BUFFER_SWITCH_EVENT
 	   && kbd_fetch_ptr != kbd_store_ptr
-	   && kbd_store_ptr->kind == buffer_switch_event)
+	   && kbd_store_ptr->kind == BUFFER_SWITCH_EVENT)
     return;
 
   if (kbd_store_ptr - kbd_buffer == KBD_BUFFER_SIZE)
@@ -3418,12 +3418,12 @@
     {
       int idx;
       
-#if 0 /* The selection_request_event case looks bogus, and it's error
+#if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error
 	 prone to assign individual members for other events, in case
 	 the input_event structure is changed.  --2000-07-13, gerd.  */
       struct input_event *sp = kbd_store_ptr;
       sp->kind = event->kind;
-      if (event->kind == selection_request_event)
+      if (event->kind == SELECTION_REQUEST_EVENT)
 	{
 	  /* We must not use the ordinary copying code for this case,
 	     since `part' is an enum and copying it might not copy enough
@@ -3507,7 +3507,7 @@
 
 
 /* Discard any mouse events in the event buffer by setting them to
-   no_event.  */
+   NO_EVENT.  */
 void
 discard_mouse_events ()
 {
@@ -3517,22 +3517,22 @@
       if (sp == kbd_buffer + KBD_BUFFER_SIZE)
 	sp = kbd_buffer;
 
-      if (sp->kind == mouse_click
+      if (sp->kind == MOUSE_CLICK_EVENT
 #ifdef WINDOWSNT
-	  || sp->kind == w32_scroll_bar_click
-#endif
-	  || sp->kind == scroll_bar_click)
-	{
-	  sp->kind = no_event;
+	  || sp->kind == W32_SCROLL_BAR_CLICK_EVENT
+#endif
+	  || sp->kind == SCROLL_BAR_CLICK_EVENT)
+	{
+	  sp->kind = NO_EVENT;
 	}
     }
 }
 
 
 /* Return non-zero if there are any real events waiting in the event
-   buffer, not counting `no_event's.
-
-   If DISCARD is non-zero, discard no_event events at the front of
+   buffer, not counting `NO_EVENT's.
+
+   If DISCARD is non-zero, discard NO_EVENT events at the front of
    the input queue, possibly leaving the input queue empty if there
    are no real input events.  */
 
@@ -3543,7 +3543,7 @@
   struct input_event *sp;
   
   for (sp = kbd_fetch_ptr;
-       sp != kbd_store_ptr && sp->kind == no_event;
+       sp != kbd_store_ptr && sp->kind == NO_EVENT;
        ++sp)
     {
       if (sp == kbd_buffer + KBD_BUFFER_SIZE)
@@ -3553,7 +3553,7 @@
   if (discard)
     kbd_fetch_ptr = sp;
 
-  return sp != kbd_store_ptr && sp->kind != no_event;
+  return sp != kbd_store_ptr && sp->kind != NO_EVENT;
 }
 
 
@@ -3566,7 +3566,7 @@
   int idx = 2 * (event - kbd_buffer);
   ASET (kbd_buffer_gcpro, idx, Qnil);
   ASET (kbd_buffer_gcpro, idx + 1, Qnil);
-  event->kind = no_event;
+  event->kind = NO_EVENT;
 }
 
 
@@ -3671,7 +3671,7 @@
       /* These two kinds of events get special handling
 	 and don't actually appear to the command loop.
 	 We return nil for them.  */
-      if (event->kind == selection_request_event)
+      if (event->kind == SELECTION_REQUEST_EVENT)
 	{
 #ifdef HAVE_X11
 	  struct input_event copy;
@@ -3690,7 +3690,7 @@
 #endif
 	}
 
-      else if (event->kind == selection_clear_event)
+      else if (event->kind == SELECTION_CLEAR_EVENT)
 	{
 #ifdef HAVE_X11
 	  struct input_event copy;
@@ -3707,7 +3707,7 @@
 #endif
 	}
 #if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
-      else if (event->kind == delete_window_event)
+      else if (event->kind == DELETE_WINDOW_EVENT)
 	{
 	  /* Make an event (delete-frame (FRAME)).  */
 	  obj = Fcons (event->frame_or_window, Qnil);
@@ -3716,14 +3716,14 @@
 	}
 #endif
 #if defined (HAVE_X11) || defined (HAVE_NTGUI)
-      else if (event->kind == iconify_event)
+      else if (event->kind == ICONIFY_EVENT)
 	{
 	  /* Make an event (iconify-frame (FRAME)).  */
 	  obj = Fcons (event->frame_or_window, Qnil);
 	  obj = Fcons (Qiconify_frame, Fcons (obj, Qnil));
 	  kbd_fetch_ptr = event + 1;
 	}
-      else if (event->kind == deiconify_event)
+      else if (event->kind == DEICONIFY_EVENT)
 	{
 	  /* Make an event (make-frame-visible (FRAME)).  */
 	  obj = Fcons (event->frame_or_window, Qnil);
@@ -3731,14 +3731,14 @@
 	  kbd_fetch_ptr = event + 1;
 	}
 #endif
-      else if (event->kind == buffer_switch_event)
+      else if (event->kind == BUFFER_SWITCH_EVENT)
 	{
 	  /* The value doesn't matter here; only the type is tested.  */
 	  XSETBUFFER (obj, current_buffer);
 	  kbd_fetch_ptr = event + 1;
 	}
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
-      else if (event->kind == menu_bar_activate_event)
+      else if (event->kind == MENU_BAR_ACTIVATE_EVENT)
 	{
 	  kbd_fetch_ptr = event + 1;
 	  input_pending = readable_events (0);
@@ -3747,7 +3747,7 @@
 	}
 #endif
 #ifdef WINDOWSNT
-      else if (event->kind == language_change_event)
+      else if (event->kind == LANGUAGE_CHANGE_EVENT)
 	{
 	  /* Make an event (language-change (FRAME CHARSET LCID)).  */
 	  obj = Fcons (event->modifiers, Qnil);
@@ -3757,7 +3757,7 @@
 	  kbd_fetch_ptr = event + 1;
 	}
 #endif
-      else if (event->kind == save_session_event)
+      else if (event->kind == SAVE_SESSION_EVENT)
         {
           obj = Fcons (Qsave_session, Qnil);
 	  kbd_fetch_ptr = event + 1;
@@ -3768,9 +3768,9 @@
 	 (They shouldn't otherwise be found in the buffer,
 	 but on some machines it appears they do show up
 	 even without MULTI_KBOARD.)  */
-      /* On Windows NT/9X, no_event is used to delete extraneous
+      /* On Windows NT/9X, NO_EVENT is used to delete extraneous
          mouse events during a popup-menu call.  */
-      else if (event->kind == no_event)
+      else if (event->kind == NO_EVENT)
 	kbd_fetch_ptr = event + 1;
       else if (event->kind == HELP_EVENT)
 	{
@@ -3938,7 +3938,7 @@
 
       /* These two kinds of events get special handling
 	 and don't actually appear to the command loop.  */
-      if (event->kind == selection_request_event)
+      if (event->kind == SELECTION_REQUEST_EVENT)
 	{
 #ifdef HAVE_X11
 	  struct input_event copy;
@@ -3957,7 +3957,7 @@
 #endif
 	}
 
-      else if (event->kind == selection_clear_event)
+      else if (event->kind == SELECTION_CLEAR_EVENT)
 	{
 #ifdef HAVE_X11
 	  struct input_event copy;
@@ -4724,7 +4724,7 @@
   switch (SWITCH_ENUM_CAST (event->kind))
     {
       /* A simple keystroke.  */
-    case ascii_keystroke:
+    case ASCII_KEYSTROKE_EVENT:
       {
 	Lisp_Object lispy_c;
 	int c = event->code & 0377;
@@ -4748,7 +4748,7 @@
 	return lispy_c;
       }
 
-    case multibyte_char_keystroke:
+    case MULTIBYTE_CHAR_KEYSTROKE_EVENT:
       {
 	Lisp_Object lispy_c;
 
@@ -4758,7 +4758,7 @@
 
       /* A function key.  The symbol may need to have modifier prefixes
 	 tacked onto it.  */
-    case non_ascii_keystroke:
+    case NON_ASCII_KEYSTROKE_EVENT:
       button_down_time = 0;
 
       for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++)
@@ -4820,9 +4820,9 @@
 #ifdef HAVE_MOUSE
       /* A mouse click.  Figure out where it is, decide whether it's
          a press, click or drag, and build the appropriate structure.  */
-    case mouse_click:
+    case MOUSE_CLICK_EVENT:
 #ifndef USE_TOOLKIT_SCROLL_BARS
-    case scroll_bar_click:
+    case SCROLL_BAR_CLICK_EVENT:
 #endif
       {
 	int button = event->code;
@@ -4835,7 +4835,7 @@
 	position = Qnil;
 
 	/* Build the position as appropriate for this mouse click.  */
-	if (event->kind == mouse_click)
+	if (event->kind == MOUSE_CLICK_EVENT)
 	  {
 	    int part;
 	    struct frame *f = XFRAME (event->frame_or_window);
@@ -5165,7 +5165,7 @@
 	 index of type `enum scroll_bar_part' which we can use as an
 	 index in scroll_bar_parts to get the appropriate symbol.  */
 	 
-    case scroll_bar_click:
+    case SCROLL_BAR_CLICK_EVENT:
       {
 	Lisp_Object position, head, window, portion_whole, part;
 
@@ -5196,7 +5196,7 @@
 #endif /* USE_TOOLKIT_SCROLL_BARS */
 
 #ifdef WINDOWSNT
-    case w32_scroll_bar_click:
+    case W32_SCROLL_BAR_CLICK_EVENT:
       {
 	int button = event->code;
 	int is_double;
@@ -5239,7 +5239,7 @@
 			       Qnil));
 	}
       }
-    case mouse_wheel:
+    case MOUSE_WHEEL_EVENT:
       {
 	int part;
 	FRAME_PTR f = XFRAME (event->frame_or_window);
@@ -5312,7 +5312,7 @@
       }
 #endif /* WINDOWSNT */
 
-    case drag_n_drop:
+    case DRAG_N_DROP_EVENT:
       {
 	int part;
 	FRAME_PTR f;
@@ -5418,7 +5418,7 @@
       /* A user signal.  */
       return *lispy_user_signals[event->code];
       
-    case save_session_event:
+    case SAVE_SESSION_EVENT:
       return Qsave_session;
       
       /* The 'kind' field of the event is something we don't recognize.  */
@@ -6194,7 +6194,7 @@
 #endif
 }
 
-/* Put a buffer_switch_event in the buffer
+/* Put a BUFFER_SWITCH_EVENT in the buffer
    so that read_key_sequence will notice the new current buffer.  */
 
 void
@@ -6203,7 +6203,7 @@
   struct input_event event;
   Lisp_Object tem;
 
-  event.kind = buffer_switch_event;
+  event.kind = BUFFER_SWITCH_EVENT;
   event.frame_or_window = Qnil;
   event.arg = Qnil;
 
@@ -6358,7 +6358,7 @@
 #endif /* no FIONREAD */
       for (i = 0; i < nread; i++)
 	{
-	  buf[i].kind = ascii_keystroke;
+	  buf[i].kind = ASCII_KEYSTROKE_EVENT;
 	  buf[i].modifiers = 0;
 	  if (meta_key == 1 && (cbuf[i] & 0x80))
 	    buf[i].modifiers = meta_modifier;
@@ -6377,7 +6377,7 @@
       kbd_buffer_store_event (&buf[i]);
       /* Don't look at input that follows a C-g too closely.
 	 This reduces lossage due to autorepeat on C-g.  */
-      if (buf[i].kind == ascii_keystroke
+      if (buf[i].kind == ASCII_KEYSTROKE_EVENT
 	  && buf[i].code == quit_char)
 	break;
     }
@@ -9822,10 +9822,10 @@
       
       if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
 	kbd_fetch_ptr = kbd_buffer;
-      if (kbd_fetch_ptr->kind == ascii_keystroke)
+      if (kbd_fetch_ptr->kind == ASCII_KEYSTROKE_EVENT)
 	stuff_char (kbd_fetch_ptr->code);
       
-      kbd_fetch_ptr->kind = no_event;
+      kbd_fetch_ptr->kind = NO_EVENT;
       idx = 2 * (kbd_fetch_ptr - kbd_buffer);
       ASET (kbd_buffer_gcpro, idx, Qnil);
       ASET (kbd_buffer_gcpro, idx + 1, Qnil);
--- a/src/macterm.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/macterm.c	Thu Jun 13 14:59:38 2002 +0000
@@ -6765,7 +6765,7 @@
 {
   Point mouseLoc;
 
-  result->kind = mouse_click;
+  result->kind = MOUSE_CLICK_EVENT;
   result->code = 0;  /* only one mouse button */
   result->timestamp = event->when;
   result->modifiers = event->what == mouseDown ? down_modifier : up_modifier;
@@ -8712,7 +8712,7 @@
 }
 
 /* Handle a mouse click on the scroll bar BAR.  If *EMACS_EVENT's kind
-   is set to something other than no_event, it is enqueued.
+   is set to something other than NO_EVENT, it is enqueued.
 
    This may be called from a signal handler, so we have to ignore GC
    mark bits.  */
@@ -8727,7 +8727,7 @@
   if (! GC_WINDOWP (bar->window))
     abort ();
 
-  bufp->kind = scroll_bar_click;
+  bufp->kind = SCROLL_BAR_CLICK_EVENT;
   bufp->frame_or_window = bar->window;
   bufp->arg = Qnil;
 
@@ -12334,7 +12334,7 @@
 	      GlobalToLocal (&mouse_loc);
 		  
 	      bufp->code = 0;  /* only one mouse button */
-              bufp->kind = scroll_bar_click;
+              bufp->kind = SCROLL_BAR_CLICK_EVENT;
               bufp->frame_or_window = tracked_scroll_bar->window;
               bufp->part = scroll_bar_handle;
               bufp->modifiers = up_modifier;
@@ -12359,7 +12359,7 @@
                 struct frame *f = ((mac_output *)
 				   GetWRefCon (FrontWindow ()))->mFP;
                 saved_menu_event_location = er.where;
-                bufp->kind = menu_bar_activate_event;
+                bufp->kind = MENU_BAR_ACTIVATE_EVENT;
                 XSETFRAME (bufp->frame_or_window, f);
                 count++;
               }
@@ -12421,7 +12421,7 @@
 		    }
 		  else
 	            {
-	              bufp->kind = mouse_click;
+	              bufp->kind = MOUSE_CLICK_EVENT;
 		      XSETFRAME (bufp->frame_or_window, mwp->mFP);
 		      if (er.what == mouseDown)
 		        mouse_tracking_in_progress
@@ -12460,7 +12460,7 @@
 	    case inGoAway:
 	      if (TrackGoAway (window_ptr, er.where))
 	        {
-	          bufp->kind = delete_window_event;
+	          bufp->kind = DELETE_WINDOW_EVENT;
 	          XSETFRAME (bufp->frame_or_window,
 			     ((mac_output *) GetWRefCon (window_ptr))->mFP);
  	          count++;
@@ -12502,12 +12502,12 @@
 	  if (keycode == 0x33)  /* delete key (charCode translated to 0x8) */
 	    {
 	      bufp->code = 0x7f;
-	      bufp->kind = ascii_keystroke;
+	      bufp->kind = ASCII_KEYSTROKE_EVENT;
 	    }
 	  else if (keycode_to_xkeysym (keycode, &xkeysym))
 	    {
 	      bufp->code = 0xff00 | xkeysym;
-	      bufp->kind = non_ascii_keystroke;
+	      bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
 	    }	      
 	  else
 	    {
@@ -12528,7 +12528,7 @@
 	        }
 	      else
 	        bufp->code = er.message & charCodeMask;
-	      bufp->kind = ascii_keystroke;
+	      bufp->kind = ASCII_KEYSTROKE_EVENT;
 	    }
 	}
 
@@ -12539,7 +12539,7 @@
            Mac keyboard to be used to enter non-ASCII iso-latin-1
            characters directly.  */
         if (mac_keyboard_text_encoding != kTextEncodingMacRoman
-	    && bufp->kind == ascii_keystroke && bufp->code >= 128)
+	    && bufp->kind == ASCII_KEYSTROKE_EVENT && bufp->code >= 128)
 	  {
             static TECObjectRef converter = NULL;
             OSStatus the_err = noErr;
@@ -12610,7 +12610,7 @@
 
         AEProcessAppleEvent(&er);
         
-        /* Build a drag_n_drop type event as is done in
+        /* Build a DRAG_N_DROP_EVENT type event as is done in
            constuct_drag_n_drop in w32term.c.  */
         if (!NILP (drag_and_drop_file_list))
           {
@@ -12624,7 +12624,7 @@
             else
               f = ((mac_output *) GetWRefCon (wp))->mFP;            
             
-            bufp->kind = drag_n_drop;
+            bufp->kind = DRAG_N_DROP_EVENT;
             bufp->code = 0;
             bufp->timestamp = er.when * (1000 / 60);
 	      /* ticks to milliseconds */
--- a/src/msdos.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/msdos.c	Thu Jun 13 14:59:38 2002 +0000
@@ -3362,9 +3362,9 @@
 	}
 
       if (code >= 0x100)
-	event.kind = non_ascii_keystroke;
+	event.kind = NON_ASCII_KEYSTROKE_EVENT;
       else
-	event.kind = ascii_keystroke;
+	event.kind = ASCII_KEYSTROKE_EVENT;
       event.code = code;
       event.modifiers =	modifiers;
       event.frame_or_window = selected_frame;
@@ -3473,7 +3473,7 @@
 		      }
 		  }
 
-		event.kind = mouse_click;
+		event.kind = MOUSE_CLICK_EVENT;
 		event.code = button_num;
 		event.modifiers = dos_get_modifiers (0)
 		  | (press ? down_modifier : up_modifier);
--- a/src/termhooks.h	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/termhooks.h	Thu Jun 13 14:59:38 2002 +0000
@@ -201,10 +201,10 @@
 
 enum event_kind
 {
-  no_event,			/* nothing happened.  This should never
+  NO_EVENT,			/* nothing happened.  This should never
 				   actually appear in the event queue.  */
 
-  ascii_keystroke,		/* The ASCII code is in .code, perhaps
+  ASCII_KEYSTROKE_EVENT,	/* The ASCII code is in .code, perhaps
 				   with modifiers applied.
 				   .modifiers holds the state of the
 				   modifier keys.
@@ -212,13 +212,13 @@
 				   which the key was typed.
 				   .timestamp gives a timestamp (in
 				   milliseconds) for the keystroke.  */
-  multibyte_char_keystroke,	/* The multibye char code is in .code,
+  MULTIBYTE_CHAR_KEYSTROKE_EVENT,	/* The multibyte char code is in .code,
 				   perhaps with modifiers applied.
 				   The others are the same as
-				   ascii_keystroke.  This type of event
+				   ASCII_KEYSTROKE_EVENT.  This type of event
 				   is generated only when we are using
 				   XIM on X window.  */
-  non_ascii_keystroke,		/* .code is a number identifying the
+  NON_ASCII_KEYSTROKE_EVENT,	/* .code is a number identifying the
 				   function key.  A code N represents
 				   a key whose name is
 				   function_key_names[N]; function_key_names
@@ -230,8 +230,8 @@
 				   which the key was typed.
 				   .timestamp gives a timestamp (in
 				   milliseconds) for the keystroke.  */
-  timer_event,                  /* A timer fired.  */
-  mouse_click,			/* The button number is in .code; it must
+  TIMER_EVENT,                  /* A timer fired.  */
+  MOUSE_CLICK_EVENT,		/* The button number is in .code; it must
 				   be >= 0 and < NUM_MOUSE_BUTTONS, defined
 				   below.
 				   .modifiers holds the state of the
@@ -243,7 +243,7 @@
 				   .timestamp gives a timestamp (in
 				   milliseconds) for the click.  */
 #ifdef WINDOWSNT
-  mouse_wheel,			/* A mouse-wheel event is generated 
+  MOUSE_WHEEL_EVENT,		/* A mouse-wheel event is generated 
 				   on WINDOWSNT by a 
 				   wheel on a mouse (e.g., MS Intellimouse).
 				   The event contains a delta that corresponds
@@ -259,12 +259,12 @@
 				   the wheel event occurred in.
 				   .timestamp gives a timestamp (in
 				   milliseconds) for the wheel event.  */
-  language_change_event,	/* A language_change event is generated
+  LANGUAGE_CHANGE_EVENT,	/* A LANGUAGE_CHANGE_EVENT is generated
 				   on WINDOWSNT when the keyboard layout
 				   or input language is changed by the
 				   user.  */
 #endif
-  scroll_bar_click,		/* .code gives the number of the mouse button
+  SCROLL_BAR_CLICK_EVENT,	/* .code gives the number of the mouse button
 				   that was clicked.
 				   .modifiers holds the state of the modifier
 				   keys.
@@ -278,23 +278,23 @@
 				   .timestamp gives a timestamp (in
 				   milliseconds) for the click.  */
 #ifdef WINDOWSNT
-  w32_scroll_bar_click,	/* as for scroll_bar_click, but only generated
+  W32_SCROLL_BAR_CLICK_EVENT,	/* as for SCROLL_BAR_CLICK, but only generated
 				   by MS-Windows scroll bar controls. */
 #endif
-  selection_request_event,	/* Another X client wants a selection from us.
+  SELECTION_REQUEST_EVENT,	/* Another X client wants a selection from us.
 				   See `struct selection_event'.  */
-  selection_clear_event,	/* Another X client cleared our selection.  */
-  buffer_switch_event,		/* A process filter has switched buffers.  */
-  delete_window_event,		/* An X client said "delete this window".  */
+  SELECTION_CLEAR_EVENT,	/* Another X client cleared our selection.  */
+  BUFFER_SWITCH_EVENT,		/* A process filter has switched buffers.  */
+  DELETE_WINDOW_EVENT,		/* An X client said "delete this window".  */
   MENU_BAR_EVENT,		/* An event generated by the menu bar.
 				   The frame_or_window field's cdr holds the
 				   Lisp-level event value.
 				   (Only the toolkit version uses these.)  */
-  iconify_event,		/* An X client iconified this window.  */
-  deiconify_event,		/* An X client deiconified this window.  */
-  menu_bar_activate_event,      /* A button press in the menu bar
+  ICONIFY_EVENT,		/* An X client iconified this window.  */
+  DEICONIFY_EVENT,		/* An X client deiconified this window.  */
+  MENU_BAR_ACTIVATE_EVENT,      /* A button press in the menu bar
 				   (toolkit version only).  */
-  drag_n_drop,			/* A drag-n-drop event is generated when
+  DRAG_N_DROP_EVENT,		/* A drag-n-drop event is generated when
 				   files selected outside of Emacs are dropped
 				   onto an Emacs window.
 				   Currently used only on Windows NT.
@@ -330,11 +330,11 @@
 
   /* Queued from XTread_socket when session manager sends
      save yourself before shutdown. */
-  save_session_event
+  SAVE_SESSION_EVENT
 };
 
-/* If a struct input_event has a kind which is selection_request_event
-   or selection_clear_event, then its contents are really described
+/* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
+   or SELECTION_CLEAR_EVENT, then its contents are really described
    by `struct selection_event'; see xterm.h.  */
 
 /* The keyboard input buffer is an array of these structures.  Each one
@@ -347,9 +347,9 @@
   /* What kind of event was this?  */
   enum event_kind kind;
   
-  /* For an ascii_keystroke and multibyte_char_keystroke, this is the
-     character.
-     For a non_ascii_keystroke, this is the keysym code.
+  /* For an ASCII_KEYSTROKE_EVENT and MULTIBYTE_CHAR_KEYSTROKE_EVENT,
+     this is the character.
+     For a NON_ASCII_KEYSTROKE_EVENT, this is the keysym code.
      For a mouse event, this is the button number.  */
   /* In WindowsNT, for a mouse wheel event, this is the delta.  */
   int code;
--- a/src/w32menu.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/w32menu.c	Thu Jun 13 14:59:38 2002 +0000
@@ -935,7 +935,7 @@
 
 /* Activate the menu bar of frame F.
    This is called from keyboard.c when it gets the
-   menu_bar_activate_event out of the Emacs event queue.
+   MENU_BAR_ACTIVATE_EVENT out of the Emacs event queue.
 
    To activate the menu bar, we signal to the input thread that it can
    return from the WM_INITMENU message, allowing the normal Windows
--- a/src/w32term.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/w32term.c	Thu Jun 13 14:59:38 2002 +0000
@@ -6188,9 +6188,9 @@
   parse_button (msg->msg.message, HIWORD (msg->msg.wParam),
 		&button, &up);
 
-  /* Make the event type no_event; we'll change that when we decide
+  /* Make the event type NO_EVENT; we'll change that when we decide
      otherwise.  */
-  result->kind = mouse_click;
+  result->kind = MOUSE_CLICK_EVENT;
   result->code = button;
   result->timestamp = msg->msg.time;
   result->modifiers = (msg->dwModifiers
@@ -6212,7 +6212,7 @@
      struct frame *f;
 {
   POINT p;
-  result->kind = mouse_wheel;
+  result->kind = MOUSE_WHEEL_EVENT;
   result->code = (short) HIWORD (msg->msg.wParam);
   result->timestamp = msg->msg.time;
   result->modifiers = msg->dwModifiers;
@@ -6240,7 +6240,7 @@
   char *name;
   int i, len;
 
-  result->kind = drag_n_drop;
+  result->kind = DRAG_N_DROP_EVENT;
   result->code = 0;
   result->timestamp = msg->msg.time;
   result->modifiers = msg->dwModifiers;
@@ -8319,7 +8319,7 @@
 }
 
 /* Handle a mouse click on the scroll bar BAR.  If *EMACS_EVENT's kind
-   is set to something other than no_event, it is enqueued.
+   is set to something other than NO_EVENT, it is enqueued.
 
    This may be called from a signal handler, so we have to ignore GC
    mark bits.  */
@@ -8333,7 +8333,7 @@
   if (! GC_WINDOWP (bar->window))
     abort ();
 
-  emacs_event->kind = w32_scroll_bar_click;
+  emacs_event->kind = W32_SCROLL_BAR_CLICK_EVENT;
   emacs_event->code = 0;
   /* not really meaningful to distinguish up/down */
   emacs_event->modifiers = msg->dwModifiers;
@@ -8433,7 +8433,7 @@
 	  }
 	/* fall through */
       default:
-	emacs_event->kind = no_event;
+	emacs_event->kind = NO_EVENT;
 	return FALSE;
       }
 
@@ -8634,7 +8634,7 @@
 		     visibility changes properly.  */
 		  if (f->iconified)
 		    {
-		      bufp->kind = deiconify_event;
+		      bufp->kind = DEICONIFY_EVENT;
 		      XSETFRAME (bufp->frame_or_window, f);
 		      bufp->arg = Qnil;
 		      bufp++;
@@ -8672,7 +8672,7 @@
 	      if (numchars == 0)
 		abort ();
 	  
-	      bufp->kind = language_change_event;
+	      bufp->kind = LANGUAGE_CHANGE_EVENT;
 	      XSETFRAME (bufp->frame_or_window, f);
 	      bufp->arg = Qnil;
 	      bufp->code = msg.msg.wParam;
@@ -8698,7 +8698,7 @@
 	      if (temp_index == sizeof temp_buffer / sizeof (short))
 		temp_index = 0;
 	      temp_buffer[temp_index++] = msg.msg.wParam;
-	      bufp->kind = non_ascii_keystroke;
+	      bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
 	      bufp->code = msg.msg.wParam;
 	      bufp->modifiers = msg.dwModifiers;
 	      XSETFRAME (bufp->frame_or_window, f);
@@ -8725,7 +8725,7 @@
 	      if (temp_index == sizeof temp_buffer / sizeof (short))
 		temp_index = 0;
 	      temp_buffer[temp_index++] = msg.msg.wParam;
-	      bufp->kind = ascii_keystroke;
+	      bufp->kind = ASCII_KEYSTROKE_EVENT;
 	      bufp->code = msg.msg.wParam;
 	      bufp->modifiers = msg.dwModifiers;
 	      XSETFRAME (bufp->frame_or_window, f);
@@ -8799,7 +8799,7 @@
 	    int button;
 	    int up;
 
-            emacs_event.kind = no_event;
+            emacs_event.kind = NO_EVENT;
 	    
 	    if (dpyinfo->grabbed && last_mouse_frame
 		&& FRAME_LIVE_P (last_mouse_frame))
@@ -8991,7 +8991,7 @@
 		  f->async_visible = 0;
 		  f->async_iconified = 1;
 		  
-		  bufp->kind = iconify_event;
+		  bufp->kind = ICONIFY_EVENT;
 		  XSETFRAME (bufp->frame_or_window, f);
 		  bufp->arg = Qnil;
 		  bufp++;
@@ -9021,7 +9021,7 @@
                       f->output_data.w32->left_pos = x;
                       f->output_data.w32->top_pos = y;
 
-		      bufp->kind = deiconify_event;
+		      bufp->kind = DEICONIFY_EVENT;
 		      XSETFRAME (bufp->frame_or_window, f);
 		      bufp->arg = Qnil;
 		      bufp++;
@@ -9169,7 +9169,7 @@
 	      if (numchars == 0)
 		abort ();
 	      
-	      bufp->kind = delete_window_event;
+	      bufp->kind = DELETE_WINDOW_EVENT;
 	      XSETFRAME (bufp->frame_or_window, f);
 	      bufp->arg = Qnil;
 	      bufp++;
@@ -9186,7 +9186,7 @@
 	      if (numchars == 0)
 		abort ();
 	  
-	      bufp->kind = menu_bar_activate_event;
+	      bufp->kind = MENU_BAR_ACTIVATE_EVENT;
 	      XSETFRAME (bufp->frame_or_window, f);
 	      bufp->arg = Qnil;
 	      bufp++;
--- a/src/xmenu.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/xmenu.c	Thu Jun 13 14:59:38 2002 +0000
@@ -1105,7 +1105,7 @@
 
 /* Activate the menu bar of frame F.
    This is called from keyboard.c when it gets the
-   menu_bar_activate_event out of the Emacs event queue.
+   MENU_BAR_ACTIVATE_EVENT out of the Emacs event queue.
 
    To activate the menu bar, we use the X button-press event
    that was saved in saved_menu_event.
--- a/src/xsmfns.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/xsmfns.c	Thu Jun 13 14:59:38 2002 +0000
@@ -57,15 +57,15 @@
 
 extern Lisp_Object Vuser_login_name;
 
-/* This is the event used when save_session occurs */
+/* This is the event used when SAVE_SESSION_EVENT occurs.  */
 
 static struct input_event emacs_event;
 
-/* The descriptor that we use to check for data from the session manager. */
+/* The descriptor that we use to check for data from the session manager.  */
 
 static int ice_fd = -1;
 
-/* A flag that says if we are in shutdown interactions or not. */
+/* A flag that says if we are in shutdown interactions or not.  */
 
 static int doing_interact = False;
 
@@ -98,7 +98,7 @@
    open to a session manager, just return 0.
    Otherwise returns the number of events stored in buffer BUFP,
    which can hold up to *NUMCHARS characters.  At most one event is
-   stored, an save_session_event. */
+   stored, an SAVE_SESSION_EVENT. */
 int
 x_session_check_input (bufp, numchars)
      struct input_event *bufp;
@@ -117,9 +117,9 @@
   
   /* Reset this so wo can check kind after callbacks have been called by
      IceProcessMessages.  The smc_interact_CB sets the kind to
-     save_session_event, but we don't know beforehand if that callback
+     SAVE_SESSION_EVENT, but we don't know beforehand if that callback
      will be called. */
-  emacs_event.kind = no_event;
+  emacs_event.kind = NO_EVENT;
 
   if (select (ice_fd+1, &read_fds,
               (SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0)
@@ -135,8 +135,8 @@
 
   
   /* Check if smc_interact_CB was called and we shall generate a
-     save_session event. */
-  if (*numchars > 0 && emacs_event.kind != no_event)
+     SAVE_SESSION_EVENT. */
+  if (*numchars > 0 && emacs_event.kind != NO_EVENT)
     {
       bcopy (&emacs_event, bufp, sizeof (struct input_event));
       bufp++;
@@ -156,7 +156,7 @@
 }
 
 /* This is called when the session manager says it is OK to interact with the
-   user.  Here we set the kind to save_session so an event is generated.
+   user.  Here we set the kind to SAVE_SESSION_EVENT so an event is generated.
    Then lisp code can interact with the user. */
 static void
 smc_interact_CB (smcConn, clientData)
@@ -164,7 +164,7 @@
      SmPointer clientData;
 {
   doing_interact = True;
-  emacs_event.kind = save_session_event;
+  emacs_event.kind = SAVE_SESSION_EVENT;
 }
 
 /* This is called when the session manager tells us to save ourself.
--- a/src/xterm.c	Thu Jun 13 12:10:39 2002 +0000
+++ b/src/xterm.c	Thu Jun 13 14:59:38 2002 +0000
@@ -6636,9 +6636,9 @@
      XButtonEvent *event;
      struct frame *f;
 {
-  /* Make the event type no_event; we'll change that when we decide
+  /* Make the event type NO_EVENT; we'll change that when we decide
      otherwise.  */
-  result->kind = mouse_click;
+  result->kind = MOUSE_CLICK_EVENT;
   result->code = event->button - Button1;
   result->timestamp = event->time;
   result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
@@ -8325,7 +8325,7 @@
 /* Action hook installed via XtAppAddActionHook when toolkit scroll
    bars are used..  The hook is responsible for detecting when
    the user ends an interaction with the scroll bar, and generates
-   a `end-scroll' scroll_bar_click' event if so.  */
+   a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so.  */
 
 static void
 xt_action_hook (widget, client_data, action_name, event, params,
@@ -8455,7 +8455,7 @@
   XSETWINDOW (window, w);
   f = XFRAME (w->frame);
   
-  ievent->kind = scroll_bar_click;
+  ievent->kind = SCROLL_BAR_CLICK_EVENT;
   ievent->frame_or_window = window;
   ievent->arg = Qnil;
   ievent->timestamp = XtLastTimestampProcessed (FRAME_X_DISPLAY (f));
@@ -9513,7 +9513,7 @@
 }
 
 /* Handle a mouse click on the scroll bar BAR.  If *EMACS_EVENT's kind
-   is set to something other than no_event, it is enqueued.
+   is set to something other than NO_EVENT, it is enqueued.
 
    This may be called from a signal handler, so we have to ignore GC
    mark bits.  */
@@ -9529,7 +9529,7 @@
   if (! GC_WINDOWP (bar->window))
     abort ();
 
-  emacs_event->kind = scroll_bar_click;
+  emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
   emacs_event->code = event->xbutton.button - Button1;
   emacs_event->modifiers
     = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO 
@@ -9896,7 +9896,7 @@
          bcopy (&event, f->output_data.x->saved_menu_event, size);	\
          if (numchars >= 1)						\
            {								\
-             bufp->kind = menu_bar_activate_event;			\
+             bufp->kind = MENU_BAR_ACTIVATE_EVENT;			\
              XSETFRAME (bufp->frame_or_window, f);			\
              bufp->arg = Qnil;						\
              bufp++;							\
@@ -10113,7 +10113,7 @@
 			    if (numchars == 0)
 			      abort ();
 
-			    bufp->kind = delete_window_event;
+			    bufp->kind = DELETE_WINDOW_EVENT;
 			    XSETFRAME (bufp->frame_or_window, f);
 			    bufp->arg = Qnil;
 			    bufp++;
@@ -10203,7 +10203,7 @@
 		if (numchars == 0)
 		  abort ();
 
-		bufp->kind = selection_clear_event;
+		bufp->kind = SELECTION_CLEAR_EVENT;
 		SELECTION_EVENT_DISPLAY (bufp) = eventp->display;
 		SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
 		SELECTION_EVENT_TIME (bufp) = eventp->time;
@@ -10232,7 +10232,7 @@
 		  if (numchars == 0)
 		    abort ();
 
-		  bufp->kind = selection_request_event;
+		  bufp->kind = SELECTION_REQUEST_EVENT;
 		  SELECTION_EVENT_DISPLAY (bufp) = eventp->display;
 		  SELECTION_EVENT_REQUESTOR (bufp) = eventp->requestor;
 		  SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
@@ -10372,7 +10372,7 @@
 		    {
 		      f->async_iconified = 1;
 
-		      bufp->kind = iconify_event;
+		      bufp->kind = ICONIFY_EVENT;
 		      XSETFRAME (bufp->frame_or_window, f);
 		      bufp->arg = Qnil;
 		      bufp++;
@@ -10404,7 +10404,7 @@
 
 		  if (f->iconified)
 		    {
-		      bufp->kind = deiconify_event;
+		      bufp->kind = DEICONIFY_EVENT;
 		      XSETFRAME (bufp->frame_or_window, f);
 		      bufp->arg = Qnil;
 		      bufp++;
@@ -10640,7 +10640,7 @@
 			  if (temp_index == sizeof temp_buffer / sizeof (short))
 			    temp_index = 0;
 			  temp_buffer[temp_index++] = keysym;
-			  bufp->kind = non_ascii_keystroke;
+			  bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
 			  bufp->code = keysym;
 			  XSETFRAME (bufp->frame_or_window, f);
 			  bufp->arg = Qnil;
@@ -10703,8 +10703,8 @@
 							    nbytes - i, len);
 			      
 			      bufp->kind = (SINGLE_BYTE_CHAR_P (c)
-					    ? ascii_keystroke
-					    : multibyte_char_keystroke);
+					    ? ASCII_KEYSTROKE_EVENT
+					    : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
 			      bufp->code = c;
 			      XSETFRAME (bufp->frame_or_window, f);
 			      bufp->arg = Qnil;
@@ -11032,7 +11032,7 @@
 		struct input_event emacs_event;
 		int tool_bar_p = 0;
 		
-		emacs_event.kind = no_event;
+		emacs_event.kind = NO_EVENT;
 		bzero (&compose_status, sizeof (compose_status));
 
 		if (dpyinfo->grabbed
@@ -11098,7 +11098,7 @@
 		    dpyinfo->grabbed &= ~(1 << event.xbutton.button);
 		  }
 
-		if (numchars >= 1 && emacs_event.kind != no_event)
+		if (numchars >= 1 && emacs_event.kind != NO_EVENT)
 		  {
 		    bcopy (&emacs_event, bufp, sizeof (struct input_event));
 		    bufp++;