Function: mc/repeat-command

mc/repeat-command is an interactive and natively compiled function defined in multiple-cursors-core.el.

Signature

(mc/repeat-command)

Documentation

Run last command from command-history(var)/command-history(fun) for every fake cursor.

Key Bindings

mc/keymap C-:

Source Code

;; Defined in /nix/store/5q7a78ihkz25lf4xmxaa9m7b2ym63m36-emacs-packages-deps/share/emacs/site-lisp/elpa/multiple-cursors-20260419.931/multiple-cursors-core.el
(defun mc/repeat-command ()
  "Run last command from `command-history' for every fake cursor."
  (interactive)
  (when (or mc/always-repeat-command
            (y-or-n-p (format "[mc] repeat complex command: %s? " (caar command-history))))
    (mc/execute-command-for-all-fake-cursors
     (lambda () (interactive)
       (cl-letf (((symbol-function 'read-from-minibuffer)
                  (lambda (_p &optional i &rest _) (read i))))
         (repeat-complex-command 0))))))