13

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.

1 Answer 1

20

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

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

in your Emacs configuration.

Sign up to request clarification or add additional context in comments.

2 Comments

And if you use elpy: (add-hook 'elpy-mode-hook 'flyspell-prog-mode)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.