diff src/event-stream.c @ 187:b405438285a2 r20-3b20

Import from CVS: tag r20-3b20
author cvs
date Mon, 13 Aug 2007 09:56:28 +0200
parents 3d6bfa290dbd
children 489f57a838ef
line wrap: on
line diff
--- a/src/event-stream.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/event-stream.c	Mon Aug 13 09:56:28 2007 +0200
@@ -224,6 +224,10 @@
 int recent_keys_ring_size;
 int recent_keys_ring_index;
 
+/* Boolean specifying whether keystrokes should be added to
+   recent-keys. */
+int inhibit_input_event_recording;
+
 /* prefix key(s) that must match in order to activate menu.
    This is ugly.  fix me.
    */
@@ -2220,7 +2224,8 @@
   if (store_this_key)
     {
       push_this_command_keys (event);
-      push_recent_keys (event);
+      if (!inhibit_input_event_recording)
+	push_recent_keys (event);
       dribble_out_event (event);
       if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro))
 	{
@@ -5159,6 +5164,11 @@
   debug_emacs_events = 0;
 #endif
 
+  DEFVAR_BOOL ("inhibit-input-event-recording", &inhibit_input_event_recording /*
+Non-nil inhibits recording of input-events to recent-keys ring.
+*/ );
+  inhibit_input_event_recording = 0;
+
   DEFVAR_LISP("menu-accelerator-prefix", &Vmenu_accelerator_prefix /*
 Prefix key(s) that must be typed before menu accelerators will be activated.
 Set this to a value acceptable by define-key.