aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 1f2227f419a..76101090d4c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9786,10 +9786,16 @@ If FILE is nil, close any open dribble file. */)
9786 9786
9787DEFUN ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0, 9787DEFUN ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0,
9788 doc: /* Discard the contents of the terminal input buffer. 9788 doc: /* Discard the contents of the terminal input buffer.
9789Also cancel any kbd macro being defined. */) 9789Also end any kbd macro being defined. */)
9790 () 9790 ()
9791{ 9791{
9792 current_kboard->defining_kbd_macro = Qnil; 9792 if (!NILP (current_kboard->defining_kbd_macro))
9793 {
9794 /* Discard the last command from the macro. */
9795 Fcancel_kbd_macro_events ();
9796 end_kbd_macro ();
9797 }
9798
9793 update_mode_lines++; 9799 update_mode_lines++;
9794 9800
9795 Vunread_command_events = Qnil; 9801 Vunread_command_events = Qnil;