Subject: Re: bug#48837: Interaction between completion-moide and cc-mode new in 27.2
From: Alan Mackenzie <[email-masked]>
To: "John C. Ruttenberg" <[email-masked]>
Cc: [email-masked]
Date: Sun, 27 Jun 2021 13:36:03 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, John.

On Sat, Jun 26, 2021 at 16:17:41 -0400, John C. Ruttenberg wrote:
> Thanks.  The patch succeeded and the bug seems to be fixed.

Thanks!  I've committed the patch to the emacs-27 branch at savannah,
from where it should reach the master branch in a few days, and to stand
alone CC Mode and XEmacs.  I'm closing the bug with this post.

> I just submitted another bug but it says it needs moderation.  Did you
> see it?

By submitted, do you mean to [email-masked]?  If so, the "needs
moderation" sounds very strange indeed.  I don't know why this has
happened, and I didn't see your new bug last time I looked at the online
list (this morning, European time).  Can I suggest you try submitting it
again?

> Here is the text of the email, if not:

> Here is my C++ file:

> class __attribute__((packed)) y : z {

> Typing a new line after the  "{" indents to under the "z":

> class __attribute__((packed)) y : z {
>                                   ^ here

> I think it should indent the same as if "__attribute__((packed))" were not
> present.

This bug seems already to be fixed in the upcoming Emacs 28.1 and the
head of the standalone CC Mode.  The bug is present in Emacs 27.2.  With
a bit of bisection, I should be able to find the patch which fixed it.
With any luck, I'll be able to send you a patch for Emacs 27.2.

> This appears to be fragile in surprising ways.  If I spell "__attribute__"
> wrong (like __attribute), it does not reproduce.

> It also does not reproduce if the source file is:

> {
>   class __attribute__((packed)) y : z {

> But if the source file is:

> {
>   class __attribute__((packed)) y : z {

> then it does reproduce.

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).