defining-kbd-macro
defining-kbd-macro is a variable defined in `C source code
'.Its value is
nil
It is a terminal-local variable; global value is the same.
Documentation:
Non-nil while a keyboard macro is being defined. Don't set this!
The value is the symbol `append' while appending to the definition of
an existing macro.