Function: markdown-indent-region
markdown-indent-region is an interactive and byte-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
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/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)))