From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeff Norden 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 11:10:46 -0500 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: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11067"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 64133@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 18 18:12:14 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 1qAv0g-0002gw-DG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jun 2023 18:12:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAv0W-00008h-BY; Sun, 18 Jun 2023 12:12:04 -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 1qAv0U-00008M-EB for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 12:12:02 -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 1qAv0U-0000f9-5s for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 12:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAv0U-0005qw-1n for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 12:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jeff Norden Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2023 16:12: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.168710468022440 (code B ref 64133); Sun, 18 Jun 2023 16:12:02 +0000 Original-Received: (at 64133) by debbugs.gnu.org; 18 Jun 2023 16:11:20 +0000 Original-Received: from localhost ([127.0.0.1]:54871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAuzn-0005ps-Il for submit@debbugs.gnu.org; Sun, 18 Jun 2023 12:11:19 -0400 Original-Received: from mail-pf1-f172.google.com ([209.85.210.172]:47316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAuzm-0005pe-JP for 64133@debbugs.gnu.org; Sun, 18 Jun 2023 12:11:19 -0400 Original-Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6686ef86110so202602b3a.2 for <64133@debbugs.gnu.org>; Sun, 18 Jun 2023 09:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687104672; x=1689696672; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7c9NH02r9F0NKGKWPH74F41S1OP7zqijvv6MNbSVf6w=; b=MZwbITIEDoGrlfuC+hRmhrW9+XLLkHHWsRSUHrcm+0yO8NGxHme5CBXsKkMzezDNc6 GBd/F29ceYLzmsKYv0mPVTN/RAYSOdPtSiOTlEurqnRgAZ+cIKBpMINld/5ptRs9W2Ok wugIV3Q55X0pFtaB1OPQQV/meWseYTC90wiu0kqz2GpGydjjZ9nfty3dnsp4iwkd0xwu luNAR8/YLKoc3xQ5lwQQVz+H93m8+sSAiboELokqnluZbjUZAvCFtzowgPfSrmX3t1l6 3OF0u+F24tRFCqMCyTg7t0c5CrRgUD0FJJs5oeOkXB+psV3Yu31eXrgvIC1LVXpAMUya dr2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687104672; x=1689696672; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7c9NH02r9F0NKGKWPH74F41S1OP7zqijvv6MNbSVf6w=; b=DwMxQ+VvWqkHku7wLiTCRtJfUsbYKnASQDerF4KNiNJK3ESX47tX3oz5SbGVwTMJ8O k1sCGvzHr1/EjeRpQTFnIkYJR5GlEMwltbw32Hndx4WcX3jgd1Xd453bC9SWtQ2AxewR zH6EPf+b2KabJcWLwois4/k8rQC5CvpFQWpYhTXjsJh/DHPZ7WtqHXY4OVfHeTPbPQ6V eCqEpsALWFO+E6ztfuVfP6YOsIyPYMPXNkfIw8WaV2ca2bdqCmcC+rGZwwtDKkmhTBNv bUguDb3dBUJkbxfRwBDGJG4ibuW05EbQNtHsAiF0KTHh+CjxjvEteyDecEbqA5wN8rS8 1miQ== X-Gm-Message-State: AC+VfDw5zpCE7MNg+04F21dfMyVL4wEs3DxZUOU9OSH1tvz4KwdWB8V7 KoIAJaZKK9r9KW2Kk2goIJ3of3Rs9l8hJMTMEm4= X-Google-Smtp-Source: ACHHUZ605N41+bkUAGxGSg50sNySzdK2AYVUp4jSR3GqzPFfmjeLWjqoBnRW4O0kix+BlwfxgF3E+VurzbFcvbPR83k= X-Received: by 2002:a05:6a21:370a:b0:10c:5ff4:8bc6 with SMTP id yl10-20020a056a21370a00b0010c5ff48bc6mr3836979pzb.38.1687104672415; Sun, 18 Jun 2023 09:11:12 -0700 (PDT) In-Reply-To: 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:263645 Archived-At: On Sun, Jun 18, 2023 at 8:13=E2=80=AFAM Alan Mackenzie wrote: >... > > > Thanks, I will let Alan chime in and decide whether this should be > > > closed. > > I think, not yet. >... > I think I should be able to fix this in the next day or three. Hi Alan I don't know if this might help, but here is one more thing I found, which I can't explain at all. Tab is normally bound to c-indent-line-or-region. You can't directly re-bind tab to c-indent-line. However, if you create an interactive version with: (defun cil() (interactive) (c-indent-line)) and bind it to tab, it has the exact same behavior. This eliminates several levels of function calls between c-indent-line-or-region and c-indent-line. So, if you open the example with emacs -Q, define cil and bind it to tab with "M-x local-set-key", you can "fix" the syntax by moving to the beginning of the {3,4,5} line and pressing: At this point "C-c C-s" shows brace-list syntax. BUT, if you start again, and instead of defining "cil', just replace each with "M-: (c-indent-line)", it does *not* change the syntax that "C-c C-s" shows. For some reason that I don't understand, it seems that the minibuffer read affects the behavior. To see this, change the defun for "cil" by adding: (read-from-minibuffer "press ") after (interactive). You now need to hit after each , but I *cannot* get the syntax for the line to change with this function. -Jeff