editor/format: fix format-all-probe check
Returns '(nil nil) when there is no formatter for the current mode. This is truthy, so we needed a better check.
This commit is contained in:
parent
e866fc46aa
commit
ed0cbc1323
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ This is controlled by `+format-on-save-enabled-modes'."
|
|||
(memq major-mode (cdr +format-on-save-enabled-modes)))
|
||||
((not (memq major-mode +format-on-save-enabled-modes))))
|
||||
(not (require 'format-all nil t))
|
||||
(not (format-all-probe)))
|
||||
(equal (format-all-probe) (list nil nil)))
|
||||
(add-hook 'before-save-hook #'+format|buffer nil t)))
|
||||
|
||||
(when (featurep! +onsave)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue