Take the 2-minute tour ×

I'd like to run a spell checker on the docstrings of my Python code, if possible from within emacs.

I've found the ispell-check-comments setting which can be used to spell check only comments in code, but I was not able to target only the docstrings which are a fairly python-specific thing.

share|improve this question

1 Answer 1

up vote 12 down vote accepted

I recommend you to try flyspell-mode. You could use something like:

(add-hook 'python-mode-hook 'flyspell-prog-mode)

in your Emacs configuration.

share|improve this answer

Your Answer


