aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 5fd8cf1933a..1f2227f419a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9732,19 +9732,24 @@ appears in the echo area and in the value of `this-command-keys'. */)
9732} 9732}
9733 9733
9734DEFUN ("clear-this-command-keys", Fclear_this_command_keys, 9734DEFUN ("clear-this-command-keys", Fclear_this_command_keys,
9735 Sclear_this_command_keys, 0, 0, 0, 9735 Sclear_this_command_keys, 0, 1, 0,
9736 doc: /* Clear out the vector that `this-command-keys' returns. 9736 doc: /* Clear out the vector that `this-command-keys' returns.
9737Also clear the record of the last 100 events. */) 9737Also clear the record of the last 100 events, unless optional arg
9738 () 9738KEEP-RECORD is non-nil. */)
9739 (keep_record)
9740 Lisp_Object keep_record;
9739{ 9741{
9740 int i; 9742 int i;
9741 9743
9742 this_command_key_count = 0; 9744 this_command_key_count = 0;
9743 9745
9744 for (i = 0; i < XVECTOR (recent_keys)->size; ++i) 9746 if (NILP (keep_record))
9745 XVECTOR (recent_keys)->contents[i] = Qnil; 9747 {
9746 total_keys = 0; 9748 for (i = 0; i < XVECTOR (recent_keys)->size; ++i)
9747 recent_keys_index = 0; 9749 XVECTOR (recent_keys)->contents[i] = Qnil;
9750 total_keys = 0;
9751 recent_keys_index = 0;
9752 }
9748 return Qnil; 9753 return Qnil;
9749} 9754}
9750 9755