Function: mc/mark-next-like-this

mc/mark-next-like-this is an interactive and natively compiled function defined in mc-mark-more.el.

Signature

(mc/mark-next-like-this ARG)

Documentation

Find and mark the next part of the buffer matching the currently active region If no region is active add a cursor on the next line With negative ARG, delete the last one instead. With zero ARG, skip the last one and mark next.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/5q7a78ihkz25lf4xmxaa9m7b2ym63m36-emacs-packages-deps/share/emacs/site-lisp/elpa/multiple-cursors-20260419.931/mc-mark-more.el
;;;###autoload
(defun mc/mark-next-like-this (arg)
  "Find and mark the next part of the buffer matching the currently active region
If no region is active add a cursor on the next line
With negative ARG, delete the last one instead.
With zero ARG, skip the last one and mark next."
  (interactive "p")
  (if (< arg 0)
      (let ((cursor (mc/furthest-cursor-after-point)))
        (if cursor
            (mc/remove-fake-cursor cursor)
          (error "No cursors to be unmarked")))
    (if (region-active-p)
        (mc/mark-more-like-this (= arg 0) 'forwards)
      (mc/mark-lines arg 'forwards)))
  (mc/maybe-multiple-cursors-mode))