Is it possible to disable minor mode (for example, flyspell) for each file?

You can enable helper mode by specifying something like mode:flyspell in the local variables of the file . In my case, I want Flyspell to be the default for my org buffers (which I can configure with a hook), but there are several files where I want to disable it.

Is there an easy way to accomplish this (unless you create a new minor mode that disables flyspell and enables it using local variables)?

+4
source share
1 answer

Try the following:

 (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 really tested that it works;)

+5
source

Source: https://habr.com/ru/post/1390790/


All Articles