summary refs log tree commit diff stats
path: root/lisp/+apheleia.el
blob: f3b16e4e8f445eef1f204e5ca7e32ebab2a1e9bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;;; +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