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

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

bug#28623: 27.0.50; lisp/progmodes/cc-engine.el incorrect indentation of


From: Alan Mackenzie
Subject: bug#28623: 27.0.50; lisp/progmodes/cc-engine.el incorrect indentation of C++14 curly-brace initializer list
Date: Thu, 9 Nov 2017 18:53:54 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Tadeus.

On Thu, Nov 09, 2017 at 10:27:55 +0100, Tadeus Prastowo wrote:
> On Wed, Nov 8, 2017 at 8:23 PM, Alan Mackenzie <address@hidden> wrote:

[...]

> > I've corrected c-inside-bracelist-p such that it now uses position l as
> > this limit.  I've also taken the opportunity to simplify it quite a bit.
> > This now appears to work.

> > So, thank you for taking the time to test this, and finding this further
> > bug.

> My pleasure.  And thank you very much for looking into this last
> problem as well.

I've committed the patch to the canonical places, including the emacs-26
branch at savannah (whence it will find it's way into master), and I'm
closing the bug.

[ .... ]

> And, just out of curiosity, in cc-engine, there is a long function
> with many inline comments in the form of CASE xxx.  Why aren't those
> refactored into individual functions?  Performance issue?

There are two such functions, c-forward-decl-or-cast-1 and
c-guess-basic-syntax.  Both of them have LOTS of local variables which
would have to be passed into smaller individual functions, and sometimes
those functions would have to alter the "more global" version of the
variable.

Doing this would indeed be slower, but probably not very much.  I suspect
all the parameter passing would be awkward.  But it's worth stating that
my predecessor, Martin Stjernholm, extracted c-guess-continued-construct
from c-guess-basic-syntax, which shows that it is possible.

> --
> Best regards,
> Tadeus

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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