Fix #3175: don't format org-exported buffers
By inhibiting the formatter in temp or special buffers.
This commit is contained in:
parent
5472d46426
commit
4c61f22132
1 changed files with 5 additions and 1 deletions
|
@ -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))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue