enable 2 flyspell modes in .emacs
emacs has these 2 mode for spell checking.
Enable Flyspell mode, which highlights all misspelled words.
Enable Flyspell mode for comments and strings only.
I would like to, when I'm using java files, the flyspell-prog-mode is enabled. When I'm using latex files the flyspell-mode is enabled.
How can I do that in .emacs files?