From xemacs-m  Wed Sep 10 10:43:39 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id KAA21724
	for <xemacs-beta@xemacs.org>; Wed, 10 Sep 1997 10:43:27 -0500 (CDT)
Received: (from hniksic@localhost)
	by jagor.srce.hr (8.8.7/8.8.6) id RAA29916;
	Wed, 10 Sep 1997 17:43:17 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: [PATCH] `inhibit-input-event-recording'
X-Attribution: Hrvoje
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 10 Sep 1997 17:43:16 +0200
Message-ID: <kigbu21may3.fsf@jagor.srce.hr>
Lines: 53
X-Mailer: Gnus v5.4.65/XEmacs 20.3(beta19) - "Kyiv"

Bart Robinson's patch that implemented `record-keystrokes' would not
apply to 20.3.  Also, it forced the check to `push_recent_keys', which 
I think is wrong.  Here is the updated patch that implements
`inhibit-input-event-recording' to 20.3:

1997-09-10  Hrvoje Niksic  <hniksic@srce.hr>

	* event-stream.c (inhibit_input_event_recording): New boolean
 	variable.
	(Fnext_event): Use it.

--- src/event-stream.c.orig	Wed Sep 10 17:24:30 1997
+++ src/event-stream.c	Wed Sep 10 17:32:34 1997
@@ -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))
 	{
@@ -5158,6 +5163,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.


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it."                                    -- Donald Knuth

