4
votes

One can enable a minor mode by specifying something like mode:flyspell in file local variables. In my case, I want flyspell to be on by default for my org buffers (which I can set up via a hook), but there are a few files where I want to keep it turned off.

Is there a simple way to accomplish this (short of creating a new minor mode that would disable flyspell and enabling that using local variables)?

1

1 Answers

5
votes

Try this:

(defun my-no-flyspell-mode (&optional rest)
  (flyspell-mode -1))

You can disable flyspell mode using something like:

/* Local Variables: */
/* mode:org           */
/* mode:my-no-flyspell */
/* End:             */

And, this time, I've actually tested that it works ;)