From eeb8fc0d2394701a34ee5763521cc71c8df919e6 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" <storm@cua.dk> Date: Mon, 9 Sep 2002 22:33:51 +0000 Subject: [PATCH] (end_kbd_macro): New function. (Fend_kbd_macro): Use it. --- src/macros.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/macros.c b/src/macros.c index 456a6e31fa3..99383f758f3 100644 --- a/src/macros.c +++ b/src/macros.c @@ -131,6 +131,19 @@ macro before appending to it. */) return Qnil; } +/* Finish defining the current keyboard macro. */ + +void +end_kbd_macro () +{ + current_kboard->defining_kbd_macro = Qnil; + update_mode_lines++; + current_kboard->Vlast_kbd_macro + = make_event_array ((current_kboard->kbd_macro_end + - current_kboard->kbd_macro_buffer), + current_kboard->kbd_macro_buffer); +} + DEFUN ("end-kbd-macro", Fend_kbd_macro, Send_kbd_macro, 0, 2, "p", doc: /* Finish defining a keyboard macro. The definition was started by \\[start-kbd-macro]. @@ -157,12 +170,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */) if (!NILP (current_kboard->defining_kbd_macro)) { - current_kboard->defining_kbd_macro = Qnil; - update_mode_lines++; - current_kboard->Vlast_kbd_macro - = make_event_array ((current_kboard->kbd_macro_end - - current_kboard->kbd_macro_buffer), - current_kboard->kbd_macro_buffer); + end_kbd_macro (); message ("Keyboard macro defined"); } -- 2.39.5