emacs/lisp/+apheleia.el

18 lines
506 B
EmacsLisp

;;; +apheleia.el -*- lexical-binding: t; -*-
;;; Code:
(require 'cl-lib)
;; https://github.com/raxod502/apheleia/pull/63#issue-1077529623
(cl-defun +apheleia-indent-region (&key buffer scratch formatter callback &allow-other-keys)
(with-current-buffer scratch
(setq-local indent-line-function
(buffer-local-value 'indent-line-function buffer))
(indent-region (point-min)
(point-max))
(funcall callback)))
(provide '+apheleia)
;;; +apheleia.el ends here