Mercurial > emacs
comparison src/keyboard.c @ 46947:775e763fdaf2
(Fclear_this_command_keys): Added optional arg
KEEP-RECORD to avoid clearing lossage when we just want to clear
the current key sequence (kmacro needs this).
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Mon, 19 Aug 2002 14:58:29 +0000 |
parents | 9da9bb6c4d21 |
children | 28bab21524d4 |
comparison
equal
deleted
inserted
replaced
46946:664bdd6d9a58 | 46947:775e763fdaf2 |
---|---|
9730 before_command_echo_length_1 = before_command_echo_length; | 9730 before_command_echo_length_1 = before_command_echo_length; |
9731 return Qnil; | 9731 return Qnil; |
9732 } | 9732 } |
9733 | 9733 |
9734 DEFUN ("clear-this-command-keys", Fclear_this_command_keys, | 9734 DEFUN ("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. |
9737 Also clear the record of the last 100 events. */) | 9737 Also clear the record of the last 100 events, unless optional arg |
9738 () | 9738 KEEP-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 |
9751 DEFUN ("recursion-depth", Frecursion_depth, Srecursion_depth, 0, 0, 0, | 9756 DEFUN ("recursion-depth", Frecursion_depth, Srecursion_depth, 0, 0, 0, |
9752 doc: /* Return the current depth in recursive edits. */) | 9757 doc: /* Return the current depth in recursive edits. */) |