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

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

bug#64133: CC Mode 5.35.2 (C/*l); incorrect indentation for an arrays of


From: Alan Mackenzie
Subject: bug#64133: CC Mode 5.35.2 (C/*l); incorrect indentation for an arrays of structs.
Date: Sun, 18 Jun 2023 13:13:56 +0000

Hello, Jeff

Thanks for taking the trouble to report this bug.

On Sat, Jun 17, 2023 at 12:36:30 -0500, Jeff Norden wrote:
> On Sat, Jun 17, 2023 at 11:27 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > Thanks, I will let Alan chime in and decide whether this should be
> > closed.

I think, not yet.

> Actually, I now think that changing the style works because the gnu
> style has
>   (substatement-open . +)
> in c-offsets-alist, while linux uses (substatement-open . 0).  With
> either style, I initially get substatemnt syntax from "C-c C-s", which
> changes to brace-list when I delete space and re-indent.

> This issue *doesn't* occur if the opening brace is on its own line,
> and it looks like most styles other than gnu do not indent
> sub-statements.  So, I still think this bug can be closed, but maybe
> the resolution could be "mostly harmless" :-).

I've edebugged through c-guess-basic-syntax and subroutines, and it's
now clear there's a bug in the handling of a cache.  The cache, called
c-laomib-cache (with "laomib" standing for "looking at or maybe in
bracelist") speeds up the handling of very large brace lists which
frequently occur in generated .h files.  Without the cache, these would
have to be scanned over repeatedly, which made C Mode very slow for
these files.

I think I should be able to fix this in the next day or three.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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