diff --git a/README.md b/README.md index 5fc1770..43c454f 100644 --- a/README.md +++ b/README.md @@ -312,6 +312,19 @@ personal config with the following bit of code: (setq prelude-whitespace nil) ``` +If you like `whitespace-mode` but prefer it to not automatically +cleanup your file on save, you can disable that behavior by setting +prelude-clean-whitespace-on-save to nil in your config file with: + +```lisp +(setq prelude-clean-whitespace-on-save nil) +``` + +The prelude-clean-whitespace-on-save setting can also be set on a +per-file or directory basis by using a file variable or a +.dir-locals.el file. + + #### Disable flyspell-mode If you're not fond of spellchecking on the fly: diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 22e242c..9d3e13e 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -225,7 +225,7 @@ (flyspell-mode +1))) (defun prelude-cleanup-maybe () - (when prelude-clean-whitespace-on-save (whitespace-cleanup))) + (when prelude-clean-whitespace-on-save (whitespace-cleanup))) (defun prelude-enable-whitespace () (when prelude-whitespace