Closed akirak closed 5 years ago
But it already works fine to use:
((emacs-lisp-mode
(mode . whitespace-cleanup-mode)))
in .dir-locals.el
, whatever the emacs manual says. I'm really wary about adding an -enabled
var for a minor mode, which is already an "enabled or not" thing.
Your solution now seems to work, even though it didn't seem to work before. I don't know why, but I will close this PR.
This patch solves #9. That is, it allows the user to turn on
whitespace-cleanup-mode
only in specific files and/or directories via local variables.Usage
To turn on
whitespace-cleanup-mode
only in specific files and directories, follow this instruction:whitespace-cleanup-mode-enabled
, which is non-nil by default, to nil.global-whitespace-mode
.An example configuration with
use-package
:Then you can set
whitespace-cleanup-mode-enabled
to non-nil in specific files/projects where you want to turn onwhitespace-cleanup-mode
automatically. The following is an example of.dir-locals.el
which enables the mode in emacs-lisp-mode: