Function: mc/mark-all-dwim
mc/mark-all-dwim is an interactive and natively compiled function
defined in mc-mark-more.el.
Signature
(mc/mark-all-dwim ARG)
Documentation
Tries even harder to guess what you want to mark all of.
If the region is active and spans multiple lines, it will behave
as if mc/mark-all-in-region. With the prefix ARG, it will call
mc/edit-lines instead.
If the region is inactive or on a single line, it will behave like
mc/mark-all-like-this-dwim.
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-dwim (arg)
"Tries even harder to guess what you want to mark all of.
If the region is active and spans multiple lines, it will behave
as if `mc/mark-all-in-region'. With the prefix ARG, it will call
`mc/edit-lines' instead.
If the region is inactive or on a single line, it will behave like
`mc/mark-all-like-this-dwim'."
(interactive "P")
(if (and (use-region-p)
(not (> (mc/num-cursors) 1))
(not (= (mc/line-number-at-pos (region-beginning))
(mc/line-number-at-pos (region-end)))))
(if arg
(call-interactively 'mc/edit-lines)
(call-interactively 'mc/mark-all-in-region))
(progn
(setq this-command 'mc/mark-all-like-this-dwim)
(mc/mark-all-like-this-dwim arg))))