Fix #3175: don't format org-exported buffers

By inhibiting the formatter in temp or special buffers.
This commit is contained in:
Henrik Lissner 2020-05-20 04:45:19 -04:00
parent 5472d46426
commit 4c61f22132
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -102,7 +102,11 @@ Stolen shamelessly from go-mode"
(defun +format-probe-a (orig-fn) (defun +format-probe-a (orig-fn)
"Use `+format-with' instead, if it is set. "Use `+format-with' instead, if it is set.
Prompts for a formatter if universal arg is set." Prompts for a formatter if universal arg is set."
(cond (current-prefix-arg (cond ((or (eq +format-with :none)
(doom-temp-buffer-p (current-buffer))
(doom-special-buffer-p (current-buffer)))
nil)
(current-prefix-arg
(list (or (+format-completing-read) (list (or (+format-completing-read)
(user-error "Aborted")) (user-error "Aborted"))
t)) t))