pythonemacsspell-checkingdocstring

How to spell check python docstring with emacs?


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.


Solution

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

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

    in your Emacs configuration.