aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-12-04 12:22:46 +0000
committerGerd Moellmann2000-12-04 12:22:46 +0000
commite8a5078504f1c7f6431a8389cee571dcdc974945 (patch)
tree9745c9f201e909fe8f17fdd9405c40e228df870d /src
parent9fff53a32b227ba0ad951b7f5e710f14cf01202f (diff)
downloademacs-e8a5078504f1c7f6431a8389cee571dcdc974945.tar.gz
emacs-e8a5078504f1c7f6431a8389cee571dcdc974945.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index c6d48d65fe1..07f0bc3c423 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2891,10 +2891,20 @@ static void
2891record_char (c) 2891record_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.
@@ -2928,7 +2938,8 @@ record_char (c)
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}