mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(format): prefix arg inhibiting format-on-save
We bind to basic-save-buffer in :config default (and save-buffer calls it too), so we advise that instead. However, this is a temporary solution because it casts way too wide a net. Probably better to add a new save-without-formatting keybind instead. Fix: #8420
This commit is contained in:
@ -47,8 +47,8 @@ This is controlled by `+format-on-save-disabled-modes'."
|
||||
|
||||
(defadvice! +format--inhibit-reformat-on-prefix-arg-a (orig-fn &optional arg)
|
||||
"Make it so \\[save-buffer] with prefix arg inhibits reformatting."
|
||||
:around #'save-buffer
|
||||
(let ((apheleia-mode (and apheleia-mode (memq arg '(nil 1)))))
|
||||
:around #'basic-save-buffer
|
||||
(let ((apheleia-inhibit (or apheleia-inhibit current-prefix-arg)))
|
||||
(funcall orig-fn)))
|
||||
|
||||
;; HACK: Apheleia suppresses notifications that the current buffer has
|
||||
|
Reference in New Issue
Block a user