Merge from origin/emacs-30

84abd43f42 * lisp/treesit.el (treesit-indent-region): Handle markers...
This commit is contained in:
Sean Whitton 2025-03-24 10:41:43 +08:00
commit 3b38aa2cb5

View file

@ -2602,6 +2602,8 @@ reparse after indenting every single line.")
(defun treesit-indent-region (beg end)
"Indent the region between BEG and END.
Similar to `treesit-indent', but indent a region instead."
(when (markerp beg) (setq beg (marker-position beg)))
(when (markerp end) (setq end (marker-position end)))
(treesit-update-ranges beg end)
;; We indent `treesit--indent-region-batch-size' lines at a time, to
;; reduce the number of times the parser needs to re-parse. In each