summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorTim Ruffing <crypto@timruffing.de>2023-12-27 14:26:26 +0100
committerStefan Monnier <monnier@iro.umontreal.ca>2024-03-10 10:40:01 -0400
commitfbc5fb2561d9e1d4e5b69b349a26c49d30ffc938 (patch)
tree14f9a5b84f7cc25b4ba48450c0beb50a42ba3f7f /src/keyboard.c
parentf3da3d1c68bef60ef28d67c6d8fa5d0cba8c9f08 (diff)
downloademacs-fbc5fb2561d9e1d4e5b69b349a26c49d30ffc938.tar.gz
Extract check for end of macro to function
* src/macros.h (at_end_of_macro_p): * src/macros.c (at_end_of_macro_p): New function. * src/keyboard.c (read_char): Use the new function.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index eb0de98bad1..b6fc568cde5 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2637,8 +2637,7 @@ read_char (int commandflag, Lisp_Object map,
/* Exit the macro if we are at the end.
Also, some things replace the macro with t
to force an early exit. */
- if (EQ (Vexecuting_kbd_macro, Qt)
- || executing_kbd_macro_index >= XFIXNAT (Flength (Vexecuting_kbd_macro)))
+ if (at_end_of_macro_p ())
{
XSETINT (c, -1);
goto exit;