emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "enum class" supports for cc-mode


From: Daniel Colascione
Subject: Re: "enum class" supports for cc-mode
Date: Wed, 29 Oct 2014 17:02:28 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]