From 55bf30e0178883f25bc162d4fef7a5b9c2a50522 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Sat, 21 Mar 2026 19:01:36 +0100 Subject: [PATCH] Staticpro executing_kbd_macro * src/macros.c (syms_of_macros): Staticpro executing_kbd_macro. (executing_kbd_macro): Update comment. * src/macros.h (executing_kbd_macro): Remove redundant comment. --- src/macros.c | 6 +++++- src/macros.h | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/macros.c b/src/macros.c index 27ea2575a5c..49ab0e0ccdb 100644 --- a/src/macros.c +++ b/src/macros.c @@ -35,7 +35,8 @@ EMACS_INT executing_kbd_macro_iterations; /* This is the macro that was executing. This is not bound at each level, so after an error, it describes the innermost interrupted macro. - We use it only as a kind of flag, so no need to protect it. */ + We use it only as a kind of flag; it could be a simple bool, but we + keep the string/vector around to aid debugging. */ Lisp_Object executing_kbd_macro; @@ -428,6 +429,9 @@ This is run whether the macro ends normally or prematurely due to an error. */) The value is the symbol `append' while appending to the definition of an existing macro. */); + executing_kbd_macro = Qnil; + staticpro (&executing_kbd_macro); + DEFVAR_LISP ("executing-kbd-macro", Vexecuting_kbd_macro, doc: /* Currently executing keyboard macro (string or vector). This is nil when not executing a keyboard macro. */); diff --git a/src/macros.h b/src/macros.h index 00ce4d12f9b..f81b8266418 100644 --- a/src/macros.h +++ b/src/macros.h @@ -28,10 +28,6 @@ along with GNU Emacs. If not, see . */ extern EMACS_INT executing_kbd_macro_iterations; -/* This is the macro that was executing. - This is not bound at each level, - so after an error, it describes the innermost interrupted macro. */ - extern Lisp_Object executing_kbd_macro; /* Finish defining the current keyboard macro. */