2

In emacs flyspell-prog-mode, comments are spell-checked. However, many of my comments are commented blocks of code, and are highlighted as spelling errors. How can I tell Flyspell to ingore all of the symbols used in the program code?

Drew
  • 29,895
  • 7
  • 74
  • 104
PythonNut
  • 6,182
  • 1
  • 25
  • 41

1 Answers1

1

Short answer: You can't.

Long answer: You have to program it yourself. An entry point is the variable flyspell-generic-check-word-predicate where you can supply a function that returns nil if it shouldn't be checked and non-nil if it should, (point) is here after the word you want to analyze.

If you have this requirement only for certain modes you can set the flyspell-mode-predicate for the mode. E.g. for python-mode

(put 'python-mode 'flyspell-mode-predicate 'your-python-predicate-function)
Michael Markert
  • 3,986
  • 2
  • 19
  • 19