Function: kmacro-end-and-call-macro

kmacro-end-and-call-macro is an autoloaded, interactive and byte-compiled function defined in kmacro.el.gz.

Signature

(kmacro-end-and-call-macro ARG &optional NO-REPEAT EVENT)

Documentation

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. If triggered via a mouse EVENT, moves point to the position clicked with the mouse before calling the macro.

To give a macro a name, so you can call it even after defining other macros, use C-x C-k n (kmacro-name-last-macro).

View in manual

Key Bindings

Aliases

kmacro-end-call-mouse (obsolete since 31.1)

Source Code

;; Defined in /usr/src/emacs/lisp/kmacro.el.gz
;;;###autoload
(defun kmacro-end-and-call-macro (arg &optional no-repeat event)
  "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.
If triggered via a mouse EVENT, moves point to the position clicked
with the mouse before calling the macro.

To give a macro a name, so you can call it even after defining other
macros, use \\[kmacro-name-last-macro]."
  (interactive (list current-prefix-arg nil
                     (if (consp last-input-event) last-input-event)))
  (if defining-kbd-macro
      (kmacro-end-macro nil))
  (if event (mouse-set-point event))
  (kmacro-call-macro arg no-repeat))