python-mode for my Python code, and every once in a while the syntax highlighter gets confused and thinks everything in the buffer is a string literal. This typically seems to happen when I create a docstring; for a few seconds after I type the quotes, everything after the cursor is highlighted as a string.
Is there any way to prevent this entirely? Or, if not, is there some way to make emacs/python-mode recover more quickly?
ed: To be clear, the incorrect highlighting persists even after the quotes have been closed and the buffer saved. But again, this is not every time, just sometimes.