# HG changeset patch # User Gerd Moellmann # Date 975932566 0 # Node ID cfbe6873d4948f4c14f7468fb17f75857812c020 # Parent faa3e4d4deeaa080a5fed17a03f8af599cf963a5 (record_char): Record `help-echo' input events in recent_keys only if they display some help. Don't record `help-echo' events as macro char. diff -r faa3e4d4deea -r cfbe6873d494 src/keyboard.c --- a/src/keyboard.c Mon Dec 04 06:27:35 2000 +0000 +++ b/src/keyboard.c Mon Dec 04 12:22:46 2000 +0000 @@ -2891,10 +2891,20 @@ record_char (c) Lisp_Object c; { - total_keys++; - XVECTOR (recent_keys)->contents[recent_keys_index] = c; - if (++recent_keys_index >= NUM_RECENT_KEYS) - recent_keys_index = 0; + Lisp_Object help; + + /* Don't record `help-echo' in recent_keys unless it shows some help + message. */ + if (!CONSP (c) + || !EQ (XCAR (c), Qhelp_echo) + || (help = Fnth (make_number (2), c), + !NILP (help))) + { + total_keys++; + ASET (recent_keys, recent_keys_index, c); + if (++recent_keys_index >= NUM_RECENT_KEYS) + recent_keys_index = 0; + } /* Write c to the dribble file. If c is a lispy event, write the event's symbol to the dribble file, in . Bleaugh. @@ -2928,7 +2938,8 @@ fflush (dribble); } - store_kbd_macro_char (c); + if (!CONSP (c) || !EQ (Qhelp_echo, XCAR (c))) + store_kbd_macro_char (c); num_nonmacro_input_events++; }