Incorrect emacs indentation in a C++ class with DLL export specification <p>I often write classes with a DLL export/import specification, but this seems to confuse emacs' syntax parser. I end up with something like:</p> <pre><code>class myDllSpec Foo { public: Foo( void ); }; </code></pre> <p>Notice that the "public:" access spec is indented incorrectly, as well as everything that follows it.</p> <p>When I ask emacs to describe the syntax at the beginning of the line containing public, I get a return of:</p> <pre><code>((label 352)) </code></pre> <p>If I remove the myDllSpec, the indentation is correct, and emacs tells me that the syntax there is:</p> <pre><code>((inclass 352) (access-label 352)) </code></pre> <p>Which seems correct and reasonable. So I conclude that the syntax parser is not able to handle the DLL export spec, and that this is what's causing my indentation trouble.</p> <p>Unfortunately, I don't know how to teach the parser about my labels. Seems that this is pretty common practice, so I'm hoping there's a way around it.</p>