bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36650: 27.0.50; CC Mode: Support C++ attributes


From: Alan Mackenzie
Subject: bug#36650: 27.0.50; CC Mode: Support C++ attributes
Date: 15 Jul 2019 14:27:18 -0000
User-agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p9 (amd64))

Hello, Óscar.

In article <mailman.1275.1563115806.2688.bug-gnu-emacs@gnu.org> you wrote:

> CC Mode does not recognize C++ attributes. Just as an example, the
> presence of an attribute causes wrong indentation on this example:

> struct C {
>   C([[maybe_unused]] int x, int y)
>   : a(y)
>   {}
>   int a;
> };

> The line that begins with the colon should get another indentation
> level.

Yes.  I'll have a look at this.

> Attributes are described here:

> https://en.cppreference.com/w/cpp/language/attributes

Thanks.

> In general, considering them part of the following token for indentation
> purposes and fontifying with some existing or new face should be enough.

I will probably end up treating attributes as syntactic whitespace.
They have no syntactic connection with the code they are embedded in,
any more than macros do.

> In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit)
>  of 2019-06-29 built on sky
> Repository revision: 0b2841f9fb0ffd8514b0fb99c5673adad6b07abb
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
> System Description: Debian GNU/Linux 10 (buster)

-- 
Alan Mackenzie (Nuremberg, Germany).






reply via email to

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