On 10/29/2014 04:49 PM, Alan Mackenzie wrote: > Hi, Daniel. > > On Mon, Oct 27, 2014 at 06:36:09PM +0000, Daniel Colascione wrote: >> Here's a small patch that teaches cc-mode about C++11 "enum class" syntax. >> See http://msdn.microsoft.com/en-us/library/2dzy4k6e.aspx > >> Alan, can you take a look? > > Thanks for this, it looks good. I'll definitely install it (with proper > attribution). Thanks. > Just one or two little details: > (i) You've used `eql' rather than `eq' for comparing things in a few > places. Is there any reason for this? eql is a good habit for numbers; = and eq would work just as well in these contexts though in Emacs. > (ii) c-after-brace-list-key will be "\\<\\>" (not nil) for non-C++ > languages, I think. It's definition in cc-langs.el needs tweaking a > bit to make it nil. Good point. Would you mind making this change? > (iii) There's a question as to whether the backward searching in > c-backward-colon-prefixed-type should have an optional search limit. > But the existing c-backward-over-enum-header doesn't, so that's > something new to think about. I figure that the search will stop soon enough when we come across a token that can't be part of the enum header. Placing a generically correct bound on it seemed hard.