parent
3f66400d62
commit
13ed89f235
1 changed files with 41 additions and 38 deletions
|
@ -18,6 +18,7 @@
|
||||||
(cur-buffer (current-buffer))
|
(cur-buffer (current-buffer))
|
||||||
(formatted-buffer (get-buffer-create " *apheleia-formatted*"))
|
(formatted-buffer (get-buffer-create " *apheleia-formatted*"))
|
||||||
(indent 0))
|
(indent 0))
|
||||||
|
(unwind-protect
|
||||||
(with-current-buffer formatted-buffer
|
(with-current-buffer formatted-buffer
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(unless (featurep :system 'windows)
|
(unless (featurep :system 'windows)
|
||||||
|
@ -55,7 +56,9 @@
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(insert-buffer-substring-no-properties formatted-buffer)
|
(insert-buffer-substring-no-properties formatted-buffer)
|
||||||
(when callback (funcall callback)))
|
(when callback (funcall callback)))
|
||||||
(kill-buffer formatted-buffer)))))))
|
(kill-buffer formatted-buffer)))))
|
||||||
|
(when (doom-region-active-p)
|
||||||
|
(setq deactivate-mark t)))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue