unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Jeff Norden <norden.jeff@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 64133@debbugs.gnu.org
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	[thread overview]
Message-ID: <ZI8DFNzGLbRdoOgj@ACM> (raw)
In-Reply-To: <CAPbFCnkW+HJNTEnwTtHG_VXZsUQufrJQoN==KY5ZgRpaqaUXZA@mail.gmail.com>

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	other threads:[~2023-06-18 13:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-17 15:03 bug#64133: CC Mode 5.35.2 (C/*l); incorrect indentation for an arrays of structs Jeff Norden
2023-06-17 15:14 ` Eli Zaretskii
     [not found]   ` <CAPbFCnniiTyPQBmayZpRwS46--JW6ipmmLAzMterB5cK9NEXCA@mail.gmail.com>
2023-06-17 16:27     ` Eli Zaretskii
2023-06-17 17:36       ` Jeff Norden
2023-06-18 13:13         ` Alan Mackenzie [this message]
2023-06-18 16:10           ` Jeff Norden
2023-06-18 17:23           ` Jeff Norden
2023-06-19 11:46             ` Alan Mackenzie
2023-06-19 14:30               ` Jeff Norden
2023-06-21 10:39               ` Alan Mackenzie
2023-06-21 18:43                 ` Jeff Norden
2023-06-27 20:19                   ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=ZI8DFNzGLbRdoOgj@ACM \
    --to=acm@muc.de \
    --cc=64133@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=norden.jeff@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).