From cdbf97b4e9f64e189010edb73e3cc4b24ff4185f Mon Sep 17 00:00:00 2001 From: John Goff Date: Thu, 16 Nov 2023 12:37:46 -0500 Subject: [PATCH] fix(format): align behaviour and documentation `+format-on-save-disabled-modes` documentation was referencing behaviour that no longer exists, as well as documenting behaviour that was not implemented. --- modules/editor/format/config.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/editor/format/config.el b/modules/editor/format/config.el index 6c97ca6b4..4b02bf22d 100644 --- a/modules/editor/format/config.el +++ b/modules/editor/format/config.el @@ -5,11 +5,10 @@ tex-mode ; latexindent is broken latex-mode org-msg-edit-mode) ; doesn't need a formatter - "A list of major modes in which to reformat the buffer upon saving. -If this list begins with `not', then it negates the list. -If it is `t', it is enabled in all modes. -If nil, it is disabled in all modes, the same as if the +onsave flag wasn't - used at all. + "A list of major modes in which to not reformat the buffer upon saving. +If it is t, it is disabled in all modes, the same as if the +onsave flag + wasn't used at all. +If nil, formatting is enabled in all modes. Irrelevant if you do not have the +onsave flag enabled for this module.") (defvar +format-preserve-indentation t @@ -39,6 +38,7 @@ select buffers.") This is controlled by `+format-on-save-disabled-modes'." (or (eq major-mode 'fundamental-mode) (string-blank-p (buffer-name)) + (eq +format-on-save-disabled-modes t) (not (null (memq major-mode +format-on-save-disabled-modes)))))