comparison src/keyboard.c @ 34164:cfbe6873d494

(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.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 04 Dec 2000 12:22:46 +0000
parents d42bd79a1778
children f3a177a97f12
comparison
equal deleted inserted replaced
34163:faa3e4d4deea 34164:cfbe6873d494
2889 2889
2890 static void 2890 static void
2891 record_char (c) 2891 record_char (c)
2892 Lisp_Object c; 2892 Lisp_Object c;
2893 { 2893 {
2894 total_keys++; 2894 Lisp_Object help;
2895 XVECTOR (recent_keys)->contents[recent_keys_index] = c; 2895
2896 if (++recent_keys_index >= NUM_RECENT_KEYS) 2896 /* Don't record `help-echo' in recent_keys unless it shows some help
2897 recent_keys_index = 0; 2897 message. */
2898 if (!CONSP (c)
2899 || !EQ (XCAR (c), Qhelp_echo)
2900 || (help = Fnth (make_number (2), c),
2901 !NILP (help)))
2902 {
2903 total_keys++;
2904 ASET (recent_keys, recent_keys_index, c);
2905 if (++recent_keys_index >= NUM_RECENT_KEYS)
2906 recent_keys_index = 0;
2907 }
2898 2908
2899 /* Write c to the dribble file. If c is a lispy event, write 2909 /* Write c to the dribble file. If c is a lispy event, write
2900 the event's symbol to the dribble file, in <brackets>. Bleaugh. 2910 the event's symbol to the dribble file, in <brackets>. Bleaugh.
2901 If you, dear reader, have a better idea, you've got the source. :-) */ 2911 If you, dear reader, have a better idea, you've got the source. :-) */
2902 if (dribble) 2912 if (dribble)
2926 } 2936 }
2927 2937
2928 fflush (dribble); 2938 fflush (dribble);
2929 } 2939 }
2930 2940
2931 store_kbd_macro_char (c); 2941 if (!CONSP (c) || !EQ (Qhelp_echo, XCAR (c)))
2942 store_kbd_macro_char (c);
2932 2943
2933 num_nonmacro_input_events++; 2944 num_nonmacro_input_events++;
2934 } 2945 }
2935 2946
2936 Lisp_Object 2947 Lisp_Object