Function: mc/mark-all-like-this-dwim

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

Signature

(mc/mark-all-like-this-dwim ARG)

Documentation

Tries to guess what you want to mark all of.

Can be pressed multiple times to increase selection.

With prefix, it behaves the same as original mc/mark-all-like-this

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-all-like-this-dwim (arg)
  "Tries to guess what you want to mark all of.
Can be pressed multiple times to increase selection.

With prefix, it behaves the same as original `mc/mark-all-like-this'"
  (interactive "P")
  (if arg
      (mc/mark-all-like-this)
    (if (and (not (use-region-p))
             (derived-mode-p 'sgml-mode)
             (mc--on-tag-name-p))
        (mc/mark-sgml-tag-pair)
      (let ((before (mc/num-cursors)))
        (unless (eq last-command 'mc/mark-all-like-this-dwim)
          (setq mc--restrict-mark-all-to-symbols nil))
        (unless (use-region-p)
          (mc--mark-symbol-at-point)
          (setq mc--restrict-mark-all-to-symbols t))
        (if mc--restrict-mark-all-to-symbols
            (mc/mark-all-symbols-like-this-in-defun)
          (mc/mark-all-like-this-in-defun))
        (when (<= (mc/num-cursors) before)
          (if mc--restrict-mark-all-to-symbols
              (mc/mark-all-symbols-like-this)
            (mc/mark-all-like-this)))
        (when (<= (mc/num-cursors) before)
          (mc/mark-all-like-this))))))