From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <831qiaqfxh.fsf@gnu.org> <83y1kioxzv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31633"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 64133@debbugs.gnu.org To: Jeff Norden Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 18 15:15:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAsFQ-00084x-T2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jun 2023 15:15:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAsFH-0001yJ-VJ; Sun, 18 Jun 2023 09:15:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAsFD-0001xV-2b for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 09:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAsFC-0002ID-Oa for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 09:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAsFC-0000Zv-7H for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 09:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2023 13:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64133 X-GNU-PR-Package: emacs Original-Received: via spool by 64133-submit@debbugs.gnu.org id=B64133.16870940462142 (code B ref 64133); Sun, 18 Jun 2023 13:15:02 +0000 Original-Received: (at 64133) by debbugs.gnu.org; 18 Jun 2023 13:14:06 +0000 Original-Received: from localhost ([127.0.0.1]:53510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAsEI-0000YU-6w for submit@debbugs.gnu.org; Sun, 18 Jun 2023 09:14:06 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]:59577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAsEF-0000Xs-RW for 64133@debbugs.gnu.org; Sun, 18 Jun 2023 09:14:04 -0400 Original-Received: (qmail 8911 invoked by uid 3782); 18 Jun 2023 15:13:57 +0200 Original-Received: from acm.muc.de (p4fe157ae.dip0.t-ipconnect.de [79.225.87.174]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 18 Jun 2023 15:13:57 +0200 Original-Received: (qmail 15065 invoked by uid 1000); 18 Jun 2023 13:13:56 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263629 Archived-At: 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 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).