From unknown Tue Aug 19 01:59:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73182 <73182@debbugs.gnu.org> To: bug#73182 <73182@debbugs.gnu.org> Subject: Status: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation Reply-To: bug#73182 <73182@debbugs.gnu.org> Date: Tue, 19 Aug 2025 08:59:19 +0000 retitle 73182 CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to no= t get parsed correctly for indentation reassign 73182 cc-mode submitter 73182 Arsen Arsenovi=C4=87 severity 73182 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 11 14:52:46 2024 Received: (at submit) by debbugs.gnu.org; 11 Sep 2024 18:52:46 +0000 Received: from localhost ([127.0.0.1]:39556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soSSM-0002VT-3L for submit@debbugs.gnu.org; Wed, 11 Sep 2024 14:52:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:33728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soSSJ-0002VL-KW for submit@debbugs.gnu.org; Wed, 11 Sep 2024 14:52:45 -0400 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 1soSSC-00036n-J0 for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 14:52:36 -0400 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1soSSA-0004nh-6Q for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 14:52:36 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4X3qSJ5ryQz9tC3 for ; Wed, 11 Sep 2024 20:52:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1726080736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s6ngQ0e2I9bahuKyDIH52a6WgDlqQ5WbD2+VN7jjLBg=; b=zUTuru9DqrPOczwQzC3zflFPeeSeF2mNe2GQBx9Sbmd09XB2qRod5NaXr0Sv+9EnWZ7HPL jS7AyWVaOse5aosufNA8heqj7BWCIxkOH1UwgwnC5njLLyc/Sfd/8FIK7ncfA70Q2jP2/r rUFe/dLIdXyRHQyljjdI/tG01edWHh8dWi9Y6LdSxtTAxvqY8xLofeDYqi/zWWuVb8GZUg cgSv7v/X9sFo+2GBLG+CtjEX49FOlMae3tuiJI1At3frmmjF1NN5AXuADU3oaPccS08Dh3 uJayRGHyNnDFi08rexsi4JqBSl4hD9AegYTFOhvj5l6xnHAmpS1xLs1XB2AaPw== From: =?utf-8?Q?Arsen_Arsenovi=C4=87?= To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation X-Debbugs-Package: cc-mode Date: Wed, 11 Sep 2024 20:52:15 +0200 Message-ID: <86ttemowf4.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4X3qSJ5ryQz9tC3 Received-SPF: pass client-ip=2001:67c:2050:0:465::101; envelope-from=arsen@aarsen.me; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Package: cc-mode <#secure method=3Dpgpmime mode=3Dsign> Package: cc-mode Hi again, CC-mode appears to misindent enum and enum class: enum asda { asd }; =20=20 enum class asasdas { asda }; These should be indented same as struct per https://www.gnu.org/prep/standards/html_node/Formatting.html#index-enum-typ= es_002c-formatting (well, enum class isn't mentioned, but I see no reason to act different, and GCC appears to do this, so it'd be convenient to keep struct-like formatting). When using C-c C-s, it appears that C and C++ mode do not even recognize enum as a class-open, instead doing brace-list-open. Emacs : GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24= .42, cairo version 1.18.0) of 2024-08-31 Package: CC Mode 5.35.2 (C++//l) Buffer Style: gnu c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-st= ring-delim gen-comment-delim syntax-properties category-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 0) c-indent-comment-alist '((anchored-comment column . 0) (end-block space . = 1) (cpp-end-block space . 2)) c-indent-comments-syntactically-p nil c-block-comment-prefix "" c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+") (= other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode = . gtkdoc) (c++-mode . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-no= nempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook '(t c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (template-args-cont c-lineup-template-args c-lineup-template-args-indented-from-margin) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist) (arglist-cont c-lineup-gcc-asm-reg 0) (comment-intro c-lineup-knr-region-comment c-lineup-comment) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (constraint-cont . +) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont) (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ +) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (statement-block-intro . +) ) c-buffer-is-cc-mode 'c++-mode c-tab-always-indent t c-syntactic-indentation t c-syntactic-indentation-in-macros t c-ignore-auto-fill '(string cpp code) c-auto-align-backslashes t c-backspace-function 'backward-delete-char-untabify c-delete-function 'delete-char c-electric-pound-behavior nil c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu")) c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 8 comment-column 32 parse-sexp-ignore-comments t parse-sexp-lookup-properties t auto-fill-function 'c-do-auto-fill comment-multi-line t comment-start-skip "\\(?://+\\|/\\*+\\)\\s *" fill-prefix nil fill-column 79 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([-=E2=80=93!|#%;>*=C2= =B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6 ]*\\)" ) --=20 Arsen Arsenovi=C4=87 From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 07:45:25 2024 Received: (at 73182) by debbugs.gnu.org; 16 Sep 2024 11:45:25 +0000 Received: from localhost ([127.0.0.1]:51192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqAAX-0002QH-6j for submit@debbugs.gnu.org; Mon, 16 Sep 2024 07:45:25 -0400 Received: from mail.muc.de ([193.149.48.3]:53571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqAAT-0002I8-MM for 73182@debbugs.gnu.org; Mon, 16 Sep 2024 07:45:22 -0400 Received: (qmail 20457 invoked by uid 3782); 16 Sep 2024 13:45:01 +0200 Received: from muc.de (p4fe151cf.dip0.t-ipconnect.de [79.225.81.207]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 16 Sep 2024 13:45:00 +0200 Received: (qmail 3677 invoked by uid 1000); 16 Sep 2024 11:45:00 -0000 Date: Mon, 16 Sep 2024 11:45:00 +0000 To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation Message-ID: References: <86ttemowf4.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86ttemowf4.fsf@aarsen.me> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73182 Cc: acm@muc.de, 73182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Arsen. Thanks for taking the trouble to raise this bug report last Wednesday. On Wed, Sep 11, 2024 at 20:52:15 +0200, Arsen Arsenović via CC-Mode-help wrote: > Package: cc-mode > <#secure method=pgpmime mode=sign> > Package: cc-mode > Hi again, > CC-mode appears to misindent enum and enum class: > enum asda > { > asd > }; > enum class asasdas > { > asda > }; Yes. > These should be indented same as struct per > https://www.gnu.org/prep/standards/html_node/Formatting.html#index-enum-types_002c-formatting > (well, enum class isn't mentioned, but I see no reason to act different, > and GCC appears to do this, so it'd be convenient to keep struct-like > formatting). Yes. > When using C-c C-s, it appears that C and C++ mode do not even recognize > enum as a class-open, instead doing brace-list-open. Yes. This bug has come up at least once before, on 19 February 2014, in a post to bug-cc-mode@gnu.org from Xue Fuqiao, Subject: CC Mode 5.32.5 (C/l); The indentation of `enum' of the default `gnu' style is wrong? After having considered the matter for some time, I answered on 3 March 2014 as follows: Even though there's a bug, it's been there for a _very_ long time (since before 1997), such a long time that it would cause chaos if it were to be fixed. You can see many examples of this wrong enum indentation all through the Emacs C source, and probably throughout the entire GNU project. If this bug were to be fixed, inconsistent (even if correct) indentation would start creeping into thousands of files. I think it's best left as it is, unsatisfactory though that be. At the time, I opened a thread on emacs-devel, asking what other people thought about the bug (Date: 3 March 2014, Subject: The indentation of `enum' in the default `gnu' CC Mode style is wrong.) Only one person responded, Paul Eggert, saying he would be in favour of fixing the bug. Ten years later, now, I still think that was the right decision to make, and that the bug should remain unfixed. If you have nothing against it, I will close this bug as won't fix. Sorry about this. > Emacs : GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0) > of 2024-08-31 > Package: CC Mode 5.35.2 (C++//l) > Buffer Style: gnu > c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties category-properties 1-bit) [ .... ] > -- > Arsen Arsenović -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 17 06:44:08 2024 Received: (at 73182) by debbugs.gnu.org; 17 Sep 2024 10:44:08 +0000 Received: from localhost ([127.0.0.1]:54050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqVgm-0003ul-5H for submit@debbugs.gnu.org; Tue, 17 Sep 2024 06:44:08 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:49376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqVgj-0003tw-Fu for 73182@debbugs.gnu.org; Tue, 17 Sep 2024 06:44:06 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4X7JKB36Dhz9sWv; Tue, 17 Sep 2024 12:43:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1726569790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VSvm2TUjZMI1VYJ8HutjioHwsCNNEjnN9j7c9sIWdoU=; b=uojOtDo+dAM7Zg6Ek/Ql6nwFbgCNRQ58yLrPkCY2XGBKw3H8N4HvupEGrUN6GurZ2UjJuo cV1B2fcqsjtdRVVZAVVHEqafvC7rVqaHExgcZAirqFIWcbVflIlx2NSkujRC0sORzm7rkD 0+IkHJaBkryyl88Ueg/M9C/XFCbjRY/XPCdmn2l0SG02ryQQgtqTTFAoHkZtx4Jn9nFG6l XU/+N3t+vyb2Ymvc9H3+XNr0787AU1FdaKegwkvABAC1IzUSQwtBLVgWlzBFt0CU1GuZlY IugsLVEu5IGeo0bp6xTs5QYdlGIKsUeLTlajorO0UaCG7xt10YRjtBI4F/t1SQ== From: =?utf-8?Q?Arsen_Arsenovi=C4=87?= To: Alan Mackenzie Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation In-Reply-To: (Alan Mackenzie's message of "Mon, 16 Sep 2024 11:45:00 +0000") References: <86ttemowf4.fsf@aarsen.me> Date: Tue, 17 Sep 2024 12:43:05 +0200 Message-ID: <86frpyh87a.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4X7JKB36Dhz9sWv X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73182 Cc: 73182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Alan, Alan Mackenzie writes: > Hello, Arsen. > > Thanks for taking the trouble to raise this bug report last Wednesday. > > On Wed, Sep 11, 2024 at 20:52:15 +0200, Arsen Arsenovi=C4=87 via CC-Mode-= help wrote: >> Package: cc-mode > >> <#secure method=3Dpgpmime mode=3Dsign> >> Package: cc-mode > >> Hi again, > >> CC-mode appears to misindent enum and enum class: > >> enum asda >> { >> asd >> }; >=20=20=20 >> enum class asasdas >> { >> asda >> }; > > Yes. > >> These should be indented same as struct per >> https://www.gnu.org/prep/standards/html_node/Formatting.html#index-enum-= types_002c-formatting >> (well, enum class isn't mentioned, but I see no reason to act different, >> and GCC appears to do this, so it'd be convenient to keep struct-like >> formatting). > > Yes. > >> When using C-c C-s, it appears that C and C++ mode do not even recognize >> enum as a class-open, instead doing brace-list-open. > > Yes. This bug has come up at least once before, on 19 February 2014, in a > post to bug-cc-mode@gnu.org from Xue Fuqiao, Subject: CC Mode 5.32.5 > (C/l); The indentation of `enum' of the default `gnu' style is wrong? > After having considered the matter for some time, I answered on 3 March > 2014 as follows: > > Even though there's a bug, it's been there for a _very_ long time > (since before 1997), such a long time that it would cause chaos if > it were to be fixed. You can see many examples of this wrong enum > indentation all through the Emacs C source, and probably throughout > the entire GNU project. > > If this bug were to be fixed, inconsistent (even if correct) > indentation would start creeping into thousands of files. I think > it's best left as it is, unsatisfactory though that be. As a data point here, the correct indentation is present all over GCC (which has people using everything from vi over notepad++ to VScode, and naturally, Emacs), but it is mixed up, presumably partially as a result of this bug, so I'd prefer if the editor would DTRT OOTB. Also, if there is intention to use automatic code formatting tools, which some have expressed as desirable for the toolchain projects (and I don't disagree - helps people who aren't using Emacs to get indent right easily ;-) ), having incorrect indentation by the editor will be burdensome, as it'd result in the editor and formatter fighting often. And, given that nobody (AFAIK) uses Emacs to mass-reindent code, I suspect the fallout of a fix will be gradual and silent. As an alternative to fixing this bug so that the token is recognized as a struct, we could have a new token for enum that does get indented correctly OOTB and that affected projects adjust to avoid trouble in their codebases. > At the time, I opened a thread on emacs-devel, asking what other people > thought about the bug (Date: 3 March 2014, Subject: The indentation of > `enum' in the default `gnu' CC Mode style is wrong.) Only one person > responded, Paul Eggert, saying he would be in favour of fixing the bug. > > Ten years later, now, I still think that was the right decision to make, > and that the bug should remain unfixed. If you have nothing against it, > I will close this bug as won't fix. > > Sorry about this. No problem - thanks for responding :-) Have a lovely day. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZuldOl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTCIUBALIGJhg76HVoxQRqLkOZMBmDA5aCXpqhOfgI DWZJnTqEAP9cd1YKcqJ0y0PgAd/cm9qaf+GSuWdB0KH5Q5F1Pe91AA== =l1VZ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 17 16:31:28 2024 Received: (at 73182) by debbugs.gnu.org; 17 Sep 2024 20:31:28 +0000 Received: from localhost ([127.0.0.1]:56116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqerA-0003YX-0W for submit@debbugs.gnu.org; Tue, 17 Sep 2024 16:31:28 -0400 Received: from mail.muc.de ([193.149.48.3]:60778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqer5-0003YC-5s for 73182@debbugs.gnu.org; Tue, 17 Sep 2024 16:31:26 -0400 Received: (qmail 70683 invoked by uid 3782); 17 Sep 2024 22:30:59 +0200 Received: from muc.de (pd953a279.dip0.t-ipconnect.de [217.83.162.121]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 17 Sep 2024 22:30:59 +0200 Received: (qmail 19337 invoked by uid 1000); 17 Sep 2024 20:30:58 -0000 Date: Tue, 17 Sep 2024 20:30:58 +0000 To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation Message-ID: References: <86ttemowf4.fsf@aarsen.me> <86frpyh87a.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86frpyh87a.fsf@aarsen.me> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73182 Cc: acm@muc.de, 73182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Arsen. On Tue, Sep 17, 2024 at 12:43:05 +0200, Arsen Arsenović wrote: > Hi Alan, > Alan Mackenzie writes: > > Thanks for taking the trouble to raise this bug report last Wednesday. > > On Wed, Sep 11, 2024 at 20:52:15 +0200, Arsen Arsenović via CC-Mode-help wrote: > >> Package: cc-mode > >> <#secure method=pgpmime mode=sign> > >> Package: cc-mode > >> Hi again, > >> CC-mode appears to misindent enum and enum class: > >> enum asda > >> { > >> asd > >> }; > >> enum class asasdas > >> { > >> asda > >> }; > > Yes. > >> These should be indented same as struct per > >> https://www.gnu.org/prep/standards/html_node/Formatting.html#index-enum-types_002c-formatting > >> (well, enum class isn't mentioned, but I see no reason to act different, > >> and GCC appears to do this, so it'd be convenient to keep struct-like > >> formatting). > > Yes. > >> When using C-c C-s, it appears that C and C++ mode do not even recognize > >> enum as a class-open, instead doing brace-list-open. > > Yes. This bug has come up at least once before, on 19 February 2014, in a > > post to bug-cc-mode@gnu.org from Xue Fuqiao, Subject: CC Mode 5.32.5 > > (C/l); The indentation of `enum' of the default `gnu' style is wrong? > > After having considered the matter for some time, I answered on 3 March > > 2014 as follows: > > Even though there's a bug, it's been there for a _very_ long time > > (since before 1997), such a long time that it would cause chaos if > > it were to be fixed. You can see many examples of this wrong enum > > indentation all through the Emacs C source, and probably throughout > > the entire GNU project. > > If this bug were to be fixed, inconsistent (even if correct) > > indentation would start creeping into thousands of files. I think > > it's best left as it is, unsatisfactory though that be. > As a data point here, the correct indentation is present all over GCC > (which has people using everything from vi over notepad++ to VScode, and > naturally, Emacs), but it is mixed up, presumably partially as a result > of this bug, so I'd prefer if the editor would DTRT OOTB. Thanks. I've just written a little AWK script to count occurrences of the "standard" indentation (the opening brace directly under enum in column 0) and "non-standard" indentation (the opening brace indented under enum in column 0). The results have surprised me somewhat. In "my" version of gcc-13.3.1, there are 947 standard indentations and 81 non-standard. Even in the Emacs sources (.c, .h, .m, and .cc) we have 79 standard to 149 non-standard. That's ~35% of enums looking like they've been indented by private CC Mode styles, or by hand. So my reservations from ten years ago about possible chaos were misplaced; this chaos has already happened. As an additional factor, the newish modes, c-ts-mode, c++-ts-mode, etc., indent in the standard fashion. Also, these modes are hardly the cause of the standard indentation in the Emacs sources, many of which date back many years. So it now seems clear that the decision not to fix the bug in 2014 was a mistake. I agree with you, it should be fixed now. > Also, if there is intention to use automatic code formatting tools, > which some have expressed as desirable for the toolchain projects (and I > don't disagree - helps people who aren't using Emacs to get indent right > easily ;-) ), having incorrect indentation by the editor will be > burdensome, as it'd result in the editor and formatter fighting often. > And, given that nobody (AFAIK) uses Emacs to mass-reindent code, I > suspect the fallout of a fix will be gradual and silent. > As an alternative to fixing this bug so that the token is recognized as > a struct, we could have a new token for enum that does get indented > correctly OOTB and that affected projects adjust to avoid trouble in > their codebases. That is one possibility, yes. It seems clear that parsing enum constructs as brace-lists is suboptimal, but I feel that parsing them as structs, although easy, would be taking things just too far. So I think new symbols enum-open, etc., are the best way to go, even though this is quite a lot of work (e.g. amending the CC Mode manual, the test suite, ....). So, I will fix this bug. [ .... ] > No problem - thanks for responding :-) > Have a lovely day. > -- > Arsen Arsenović -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 18 13:00:17 2024 Received: (at 73182) by debbugs.gnu.org; 18 Sep 2024 17:00:17 +0000 Received: from localhost ([127.0.0.1]:59227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqy2K-0007zd-UO for submit@debbugs.gnu.org; Wed, 18 Sep 2024 13:00:17 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:47566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqy2H-0007yJ-TP for 73182@debbugs.gnu.org; Wed, 18 Sep 2024 13:00:15 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4X84dK5wM6z9tGd; Wed, 18 Sep 2024 18:59:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1726678789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I9cdlR4aEP2CkIPJV4PaZL65mA7V9+umb1+Rb8JrEzY=; b=B97sqqIGP/FiQYW3n7iUTqcWM381/v/uFni7ulR+lBsO83Eewx8e6ya6KSOZbyqsjMO+w2 aLI5Zf3Zm6+xqwtANIy7n4s8rZ2O4P+scv80jriqSkdAJWYc1bCq9F6rM91tF6KwxflHqo VS4/hXOt97l2LBQveHy/Ky9TVliH4cxYvu4nV2SV0S+MSW9073LGMLRUzwp732ztV5+uAT FaZr41GHan8McFlg/auWPvnh9cmnyrw41M9aq5EC+qPmhc1YBOQJBaLtMGh6CjXlT31nLg Qh3batWW1aveNYBrgPrxMbn5UHVnzYIVWbSeG6IhwAzARcCDh19X30Z9q+PrgQ== From: =?utf-8?Q?Arsen_Arsenovi=C4=87?= To: Alan Mackenzie Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation In-Reply-To: (Alan Mackenzie's message of "Tue, 17 Sep 2024 20:30:58 +0000") References: <86ttemowf4.fsf@aarsen.me> <86frpyh87a.fsf@aarsen.me> Date: Wed, 18 Sep 2024 18:59:45 +0200 Message-ID: <861q1glwxq.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73182 Cc: 73182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Alan, Alan Mackenzie writes: > Hello again, Arsen. > >> As a data point here, the correct indentation is present all over GCC >> (which has people using everything from vi over notepad++ to VScode, and >> naturally, Emacs), but it is mixed up, presumably partially as a result >> of this bug, so I'd prefer if the editor would DTRT OOTB. > > Thanks. I've just written a little AWK script to count occurrences of > the "standard" indentation (the opening brace directly under enum in > column 0) and "non-standard" indentation (the opening brace indented > under enum in column 0). The results have surprised me somewhat. Ah! Great idea. Thanks for collecting empirical data. :-) > In "my" version of gcc-13.3.1, there are 947 standard indentations and > 81 non-standard. Even in the Emacs sources (.c, .h, .m, and .cc) we > have 79 standard to 149 non-standard. That's ~35% of enums looking > like they've been indented by private CC Mode styles, or by hand. Huh, that's interesting. I expected more skew towards current behaviour. > So my reservations from ten years ago about possible chaos were > misplaced; this chaos has already happened. > > As an additional factor, the newish modes, c-ts-mode, c++-ts-mode, > etc., indent in the standard fashion. Also, these modes are hardly > the cause of the standard indentation in the Emacs sources, many of > which date back many years. > > So it now seems clear that the decision not to fix the bug in 2014 was > a mistake. I agree with you, it should be fixed now. >=20 >> Also, if there is intention to use automatic code formatting tools, >> which some have expressed as desirable for the toolchain projects (and I >> don't disagree - helps people who aren't using Emacs to get indent right >> easily ;-) ), having incorrect indentation by the editor will be >> burdensome, as it'd result in the editor and formatter fighting often. > >> And, given that nobody (AFAIK) uses Emacs to mass-reindent code, I >> suspect the fallout of a fix will be gradual and silent. > >> As an alternative to fixing this bug so that the token is recognized as >> a struct, we could have a new token for enum that does get indented >> correctly OOTB and that affected projects adjust to avoid trouble in >> their codebases. > > That is one possibility, yes. It seems clear that parsing enum > constructs as brace-lists is suboptimal, but I feel that parsing them as > structs, although easy, would be taking things just too far. So I think > new symbols enum-open, etc., are the best way to go, even though this is > quite a lot of work (e.g. amending the CC Mode manual, the test suite, > ....). > > So, I will fix this bug. Thank you again! Have a lovely day. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZusHAV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTzfgA/3DSrdkzbFqGwZNMoYM40ryKgBc2K1Uhh/// bjEME4pSAP9s5wmFEr8PGBacHfFg4byxBU8Z9qgkbutw20RUJk8WCw== =HkaP -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 17:31:38 2024 Received: (at 73182) by debbugs.gnu.org; 23 Sep 2024 21:31:38 +0000 Received: from localhost ([127.0.0.1]:44783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssqeg-0007fQ-93 for submit@debbugs.gnu.org; Mon, 23 Sep 2024 17:31:38 -0400 Received: from mail.muc.de ([193.149.48.3]:54736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssqec-0007f5-7E for 73182@debbugs.gnu.org; Mon, 23 Sep 2024 17:31:36 -0400 Received: (qmail 98313 invoked by uid 3782); 23 Sep 2024 23:31:03 +0200 Received: from muc.de (p4fe15589.dip0.t-ipconnect.de [79.225.85.137]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 23 Sep 2024 23:31:03 +0200 Received: (qmail 8396 invoked by uid 1000); 23 Sep 2024 21:31:02 -0000 Date: Mon, 23 Sep 2024 21:31:02 +0000 To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation Message-ID: References: <86ttemowf4.fsf@aarsen.me> <86frpyh87a.fsf@aarsen.me> <861q1glwxq.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <861q1glwxq.fsf@aarsen.me> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73182 Cc: acm@muc.de, 73182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Arsen. On Wed, Sep 18, 2024 at 18:59:45 +0200, Arsen Arsenović wrote: > Hi Alan, > Alan Mackenzie writes: [ .... ] > > Thanks. I've just written a little AWK script to count occurrences of > > the "standard" indentation (the opening brace directly under enum in > > column 0) and "non-standard" indentation (the opening brace indented > > under enum in column 0). The results have surprised me somewhat. > Ah! Great idea. Thanks for collecting empirical data. :-) > > In "my" version of gcc-13.3.1, there are 947 standard indentations and > > 81 non-standard. Even in the Emacs sources (.c, .h, .m, and .cc) we > > have 79 standard to 149 non-standard. That's ~35% of enums looking > > like they've been indented by private CC Mode styles, or by hand. > Huh, that's interesting. I expected more skew towards current > behaviour. So did I. > > So my reservations from ten years ago about possible chaos were > > misplaced; this chaos has already happened. [ .... ] > >> As an alternative to fixing this bug so that the token is recognized as > >> a struct, we could have a new token for enum that does get indented > >> correctly OOTB and that affected projects adjust to avoid trouble in > >> their codebases. > > That is one possibility, yes. It seems clear that parsing enum > > constructs as brace-lists is suboptimal, but I feel that parsing them as > > structs, although easy, would be taking things just too far. So I think > > new symbols enum-open, etc., are the best way to go, even though this is > > quite a lot of work (e.g. amending the CC Mode manual, the test suite, > > ....). > > So, I will fix this bug. I have implemented the above, with new sytactic symbols enum-open, enum-close, enum-intro, and enum-entry. I have also enhanced the manual and the test suite accordingly. The patch is currently ~1250 lines long. In the next day or two I will remove all my change annotations, and write a commit message. It should be completed and committed soon. > Thank you again! > Have a lovely day. > -- > Arsen Arsenović -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 24 17:13:48 2024 Received: (at 73182) by debbugs.gnu.org; 24 Sep 2024 21:13:48 +0000 Received: from localhost ([127.0.0.1]:40429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stCqx-0008VD-Mu for submit@debbugs.gnu.org; Tue, 24 Sep 2024 17:13:48 -0400 Received: from mail.muc.de ([193.149.48.3]:48853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stCqv-0008Up-C0 for 73182@debbugs.gnu.org; Tue, 24 Sep 2024 17:13:46 -0400 Received: (qmail 20879 invoked by uid 3782); 24 Sep 2024 23:06:33 +0200 Received: from muc.de (p4fe152a0.dip0.t-ipconnect.de [79.225.82.160]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 24 Sep 2024 23:06:32 +0200 Received: (qmail 25533 invoked by uid 1000); 24 Sep 2024 21:06:32 -0000 Date: Tue, 24 Sep 2024 21:06:32 +0000 To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation Message-ID: References: <86ttemowf4.fsf@aarsen.me> <86frpyh87a.fsf@aarsen.me> <861q1glwxq.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73182 Cc: acm@muc.de, 73182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Arsen. On Mon, Sep 23, 2024 at 21:31:02 +0000, Alan Mackenzie wrote: > On Wed, Sep 18, 2024 at 18:59:45 +0200, Arsen Arsenović wrote: [ .... ] > I have implemented the above, with new sytactic symbols enum-open, > enum-close, enum-intro, and enum-entry. I have also enhanced the manual > and the test suite accordingly. The patch is currently ~1250 lines long. > In the next day or two I will remove all my change annotations, and write > a commit message. It should be completed and committed soon. Now done. The new scheme is now in the master branch. Before I close the bug, could you give the code a quick testing, please, just to be as sure as possible that the change is correct. Thanks! -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 16:57:09 2024 Received: (at 73182-done) by debbugs.gnu.org; 25 Sep 2024 20:57:09 +0000 Received: from localhost ([127.0.0.1]:54645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZ4P-0000zo-4q for submit@debbugs.gnu.org; Wed, 25 Sep 2024 16:57:09 -0400 Received: from mail.muc.de ([193.149.48.3]:15394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZ4N-0000yy-DK for 73182-done@debbugs.gnu.org; Wed, 25 Sep 2024 16:57:08 -0400 Received: (qmail 54878 invoked by uid 3782); 25 Sep 2024 22:56:34 +0200 Received: from muc.de (p4fe15970.dip0.t-ipconnect.de [79.225.89.112]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 25 Sep 2024 22:56:33 +0200 Received: (qmail 16291 invoked by uid 1000); 25 Sep 2024 20:56:33 -0000 Date: Wed, 25 Sep 2024 20:56:33 +0000 To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation Message-ID: References: <86ttemowf4.fsf@aarsen.me> <86frpyh87a.fsf@aarsen.me> <861q1glwxq.fsf@aarsen.me> <861q17mpm5.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <861q17mpm5.fsf@aarsen.me> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73182-done Cc: acm@muc.de, 73182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Arsen. On Wed, Sep 25, 2024 at 22:42:58 +0200, Arsen Arsenović wrote: > Hi Alan, > Alan Mackenzie writes: > > Hello, Arsen. > > On Mon, Sep 23, 2024 at 21:31:02 +0000, Alan Mackenzie wrote: > >> On Wed, Sep 18, 2024 at 18:59:45 +0200, Arsen Arsenović wrote: > > [ .... ] > >> I have implemented the above, with new sytactic symbols enum-open, > >> enum-close, enum-intro, and enum-entry. I have also enhanced the manual > >> and the test suite accordingly. The patch is currently ~1250 lines long. > >> In the next day or two I will remove all my change annotations, and write > >> a commit message. It should be completed and committed soon. > > Now done. The new scheme is now in the master branch. > > Before I close the bug, could you give the code a quick testing, please, > > just to be as sure as possible that the change is correct. Thanks! > Yes, this now looks correct. Many thanks! I'm now closing the bug with this post. > Thank you again! > Have a lovely day. > -- > Arsen Arsenović -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 17:21:04 2024 Received: (at 73182) by debbugs.gnu.org; 25 Sep 2024 21:21:04 +0000 Received: from localhost ([127.0.0.1]:56047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZRX-0002l1-Sg for submit@debbugs.gnu.org; Wed, 25 Sep 2024 17:21:04 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:44138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZRV-0002kB-Ki for 73182@debbugs.gnu.org; Wed, 25 Sep 2024 17:21:02 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4XDTFc0MH5z9v5b; Wed, 25 Sep 2024 22:43:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1727296980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PT26l58cAW75XMI5zeXFrs5k4zNZ0jb6Yfyleq+YRl4=; b=qOr5mryVTQBzOjop0P6ZIdNciuOVmLXJaYs2+G2Wwj8QbfouHsKzHfvz0kj959oINyBqAR +IwAPBhsjIuBVm1g2RF6Wd7TbgUYQ4qA+E3gn9fRediCAebIrwxQyBET+IbxtNjoNjDGEP 8eTZcrCsQ3PAjgyfnboypL9kK7f04M9Ii+ipFRothXqrhB8DPtm9JZeiFq7vDT38931a6v nTTN6v55Tdupi1tGG4dtk9/YRfKClMTxHF9lMHz6R+LtBxQJevLMB4Uzm3p2QETARn5Omc i+tRrVRP1V9DIvrdVDDYQULzO8qQif/v0UFAoxkeaSseu32LigN1llxpj85yBg== From: =?utf-8?Q?Arsen_Arsenovi=C4=87?= To: Alan Mackenzie Subject: Re: bug#73182: CC Mode 5.35.2 (C++//l); 'enum' and 'enum class' appear to not get parsed correctly for indentation In-Reply-To: (Alan Mackenzie's message of "Tue, 24 Sep 2024 21:06:32 +0000") References: <86ttemowf4.fsf@aarsen.me> <86frpyh87a.fsf@aarsen.me> <861q1glwxq.fsf@aarsen.me> Date: Wed, 25 Sep 2024 22:42:58 +0200 Message-ID: <861q17mpm5.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73182 Cc: 73182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Alan, Alan Mackenzie writes: > Hello, Arsen. > > On Mon, Sep 23, 2024 at 21:31:02 +0000, Alan Mackenzie wrote: >> On Wed, Sep 18, 2024 at 18:59:45 +0200, Arsen Arsenovi=C4=87 wrote: > > [ .... ] > >> I have implemented the above, with new sytactic symbols enum-open, >> enum-close, enum-intro, and enum-entry. I have also enhanced the manual >> and the test suite accordingly. The patch is currently ~1250 lines long. > >> In the next day or two I will remove all my change annotations, and write >> a commit message. It should be completed and committed soon. > > Now done. The new scheme is now in the master branch. > > Before I close the bug, could you give the code a quick testing, please, > just to be as sure as possible that the change is correct. Thanks! Yes, this now looks correct. Thank you again! Have a lovely day. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZvR10l8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTiA0BALm3rJlVvVLz8smeNLQoeQanLnXb8CSvMwgw h4xqFot0AQCyyaYU3yHeOy1YvWS5CukFCp6UZUsLGfaAidVc+DzNCg== =f2pL -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Aug 19 01:59:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 24 Oct 2024 11:24:23 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator