Function: kmacro-end-and-call-macro

Call last keyboard macro, ending it first if currently being defined.
With numeric prefix ARG, repeat macro that many times.
Zero argument means repeat until there is an error.

To give a macro a permanent name, so you can call it
even after defining other macros, use M-x kmacro-name-last-macro.

(fn ARG &optional NO-REPEAT)