As I work with text in C++ mode the indentation begins to deteriorate. For example, TAB on the class line wrongly indents it: template class Build I work-around the problem by writing the buffer, killing the buffer, then visiting the file and re-indenting with TAB on the class line to get the expected indentation: template class Build Same thing happens with ESC C-q. My impression is there is internal state which doesn't get cleared as I work the text toward a syntax correct unit, causing incorrect indentation. The bad state is ultimately cleared by re-visiting the file. Sorry I can't come up with something reproducible. Has anyone else seen this issue?