- Question:
How can i select flyspell automatically by an EMACS Variable in my file (not via the .emacs configuration file!), just for that file, similar like I select the ispell dictionary just for that file
EXAMPLE abc.tex:
---SNIP---
text text ..
text text ..
<!-- LocalXIspellDict: de -->
<!-- HERE SHOULD GO THE SOLUTION -->
---SNIP---
Second Question:
How can I achieve that -- whenever I open a TeX-File, i. e., XXX.tex -- flyspell is automatically selected by configuring my init.el file? Meaning, flyspell is selected depending on the filename extension.
The second part is rather simple: Just add
flyspell-modeto themode-hookfor every mode that you want to use withflyspell.This enables flyspell whenever
text-modeis enabled (which is basically always):You probably want to use
tex-mode-hook.For the file: Put this on the beginning of the file and flyspell should be entered whenever you find that file.