about summary refs log tree commit diff stats
path: root/lisp/+apheleia.el
blob: 469232a1be5fe6faa684e04f666b8128cb0eef27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;;; +apheleia.el -*- lexical-binding: t; -*-

;;; Code:

;; https://github.com/raxod502/apheleia/pull/63#issue-1077529623
(defun +apheleia-indent-region (orig scratch callback _error)
  (with-current-buffer scratch
    (setq-local indent-line-function
                (buffer-local-value 'indent-line-function orig))
    (indent-region (point-min)
                   (point-max))
    (funcall callback)))

(provide '+apheleia)
;;; +apheleia.el ends here