Function: markdown-indent-region

markdown-indent-region is an interactive and natively compiled function defined in markdown-mode.el.

Signature

(markdown-indent-region BEG END ARG)

Documentation

Indent the region from BEG to END using some heuristics.

When ARG is non-nil, outdent the region instead. See markdown-indent-line and markdown-indent-line.

Key Bindings

markdown-mode-map C-c >

Source Code

;; Defined in /nix/store/p33zgg95aglc47pl6zlgs43vki0snxf8-emacs-packages-deps/share/emacs/site-lisp/elpa/markdown-mode-20260827.909/markdown-mode.el
(defun markdown-indent-region (beg end arg)
  "Indent the region from BEG to END using some heuristics.
When ARG is non-nil, outdent the region instead.
See `markdown-indent-line' and `markdown-indent-line'."
  (interactive "*r\nP")
  (let* ((positions (sort (delete-dups (markdown-calc-indents)) '<))
         (leftmostcol (markdown-find-leftmost-column beg end))
         (next-pos (if arg
                       (markdown-outdent-find-next-position leftmostcol positions)
                     (markdown-indent-find-next-position leftmostcol positions))))
    (indent-rigidly beg end (- next-pos leftmostcol))
    (setq deactivate-mark nil)))