Function: multiple-cursors-mode

multiple-cursors-mode is an interactive and natively compiled function defined in multiple-cursors-core.el.

Signature

(multiple-cursors-mode &optional ARG)

Documentation

Mode while multiple cursors are active.

This is a minor mode. If called interactively, toggle the Multiple-Cursors mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate the variable multiple-cursors-mode(var)/multiple-cursors-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Key Bindings

mc/keymap <return>

Source Code

;; Defined in /nix/store/5q7a78ihkz25lf4xmxaa9m7b2ym63m36-emacs-packages-deps/share/emacs/site-lisp/elpa/multiple-cursors-20260419.931/multiple-cursors-core.el
;;;###autoload
(define-minor-mode multiple-cursors-mode
  "Mode while multiple cursors are active."
  :init-value nil
  :lighter mc/mode-line
  :keymap mc/keymap
  (if multiple-cursors-mode
      (progn
        (mc/temporarily-disable-unsupported-minor-modes)
        (add-hook 'pre-command-hook #'mc/make-a-note-of-the-command-being-run nil t)
        (add-hook 'post-command-hook #'mc/execute-this-command-for-all-cursors t t)
        (run-hooks 'multiple-cursors-mode-enabled-hook))
    (remove-hook 'post-command-hook #'mc/execute-this-command-for-all-cursors t)
    (remove-hook 'pre-command-hook #'mc/make-a-note-of-the-command-being-run t)
    (setq mc--this-command nil)
    (mc--maybe-set-killed-rectangle)
    (mc/remove-fake-cursors)
    (mc/enable-temporarily-disabled-minor-modes)
    (run-hooks 'multiple-cursors-mode-disabled-hook)))