all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: 36650@debbugs.gnu.org
Subject: bug#36650: 27.0.50; CC Mode: Support C++ attributes
Date: 15 Jul 2019 14:27:18 -0000	[thread overview]
Message-ID: <20190715142718.71903.qmail@mail.muc.de> (raw)
In-Reply-To: <mailman.1275.1563115806.2688.bug-gnu-emacs@gnu.org>

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).






  parent reply	other threads:[~2019-07-15 14:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-14 14:49 bug#36650: 27.0.50; CC Mode: Support C++ attributes Óscar Fuentes
     [not found] ` <mailman.1275.1563115806.2688.bug-gnu-emacs@gnu.org>
2019-07-15 14:27   ` Alan Mackenzie [this message]
2019-07-15 15:17     ` Óscar Fuentes
2019-07-20 18:02       ` Alan Mackenzie
2019-07-20 22:21         ` Óscar Fuentes
2019-07-21 11:33           ` Alan Mackenzie
2019-07-21 14:56             ` Óscar Fuentes
2019-07-21 21:16               ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190715142718.71903.qmail@mail.muc.de \
    --to=acm@muc.de \
    --cc=36650@debbugs.gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.