From unknown Wed Jun 18 23:13:40 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#6066 <6066@debbugs.gnu.org> To: bug#6066 <6066@debbugs.gnu.org> Subject: Status: Incorrect C++ indentation in emacs 23.1.96 Reply-To: bug#6066 <6066@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:13:40 +0000 retitle 6066 Incorrect C++ indentation in emacs 23.1.96 reassign 6066 emacs,cc-mode submitter 6066 "Bob" severity 6066 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 30 12:44:18 2010 Received: (at submit) by debbugs.gnu.org; 30 Apr 2010 16:44:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7tK5-000511-C3 for submit@debbugs.gnu.org; Fri, 30 Apr 2010 12:44:17 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7tK3-00050w-OT for submit@debbugs.gnu.org; Fri, 30 Apr 2010 12:44:16 -0400 Received: from lists.gnu.org ([199.232.76.165]:33543) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O7tJy-0002Y3-Q4 for submit@debbugs.gnu.org; Fri, 30 Apr 2010 12:44:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7tJy-0002Uz-Ea for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:44:10 -0400 Received: from [140.186.70.92] (port=37824 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7tJw-0002Tc-Pt for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:44:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_05, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=no version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7tJu-0008PZ-2e for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:44:08 -0400 Received: from qmta03.emeryville.ca.mail.comcast.net ([76.96.30.32]:54681) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7tJt-0008Oo-Nu for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:44:06 -0400 Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta03.emeryville.ca.mail.comcast.net with comcast id Boyo1e0031vN32cA3sk3X4; Fri, 30 Apr 2010 16:44:03 +0000 Received: from Cache ([71.202.16.94]) by omta22.emeryville.ca.mail.comcast.net with comcast id Bsk11e00W21mHQP8isk2Mc; Fri, 30 Apr 2010 16:44:02 +0000 From: "Bob" To: "'Emacs bug Tracking System'" Subject: Incorrect C++ indentation in emacs 23.1.96 Date: Fri, 30 Apr 2010 09:44:04 -0700 Message-ID: <005701cae884$584d52b0$08e7f810$@net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0058_01CAE849.ABEE7AB0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcrohFe83ljg2PHYTMKyhtzMvXPRrQ== Content-Language: en-us X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) This is a multi-part message in MIME format. ------=_NextPart_000_0058_01CAE849.ABEE7AB0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0059_01CAE849.ABEE7AB0" ------=_NextPart_001_0059_01CAE849.ABEE7AB0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Emacs 23.1.96 incorrectly indents C++ line. To reproduce: Visit the attached "bug.H" file and do the following: 1. go-to-line 2 ( the "{") 2. C-e (end of line) 3. C-j (new line) 4. type in: typedef TypeList<[C-j] 5. go-to-line 6 (Statement >,) 6. C-k C-y (kill then yank) 7. go-to-line 4 8. C-y (you have just copied line 6) Text now looks like: namespace PT { typedef TypeList< Statement >, typedef TypeList< Statement >, Statement > >, Statement > >, Statement >::Result TStmtKindSet; } 9. C-e (end of line 4) 10. [Backspace] (to delete ',') 11. C-j (new-line) 12. type in: >::Result[TAB]TFoo; 13. go-to-line 7 (at beginning of line "typedef TypeList<") 14. [TAB] to indent <<<<<<<<<<<<< Incorrect indentation happens here <<<<<<<<<<<<<<<<<<< Text now looks like: namespace PT { typedef TypeList< Statement > >::Result TFoo; typedef TypeList< Statement >, Statement > >, Statement > >, Statement >::Result TStmtKindSet; } Observe line 7 indents incorrectly to column 0. Saving the buffer, starting a new emacs 23.1.96, visit "bug.H", [TAB] on line 7 re-indents correctly. ------=_NextPart_001_0059_01CAE849.ABEE7AB0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Emacs 23.1.96 incorrectly indents C++ = line.

 

To reproduce:

 

Visit the attached "bug.H" file and do = the following:

 

1. go-to-line 2   ( the = "{")

2. C-e (end of line)

3. C-j (new line)

 

4. type in:

 

typedef TypeList<[C-j]

 

5. go-to-line 6 =       (Statement<Assign<EAsgn::Variab= le> >,)

6. C-k C-y (kill then yank)

7. go-to-line 4

8. C-y        =             &= nbsp;  (you have just copied line 6)

 

Text now looks like:

namespace PT

{

  typedef TypeList<

    Statement<Assign<EAsgn::Variable> >,

  typedef TypeList<

    Statement<Assign<EAsgn::Variable> >,

    Statement<Symbol<Parameter<EParm::Overload> > = >,

    Statement<Symbol<Parameter<EParm::Local> > = >,

    = Statement<Instance>

    = >::Result          &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;            =    TStmtKindSet;

}

 

9. C-e (end of line 4)

10. [Backspace]       =  (to delete ',')

11. C-j (new-line)

 

12. type in:

 

>::Result[TAB]TFoo;

 

13. go-to-line 7 =       (at beginning of line "typedef TypeList<")

14. [TAB] to = indent        <<<<<<<<<<<<< Incorrect = indentation happens here <<<<<<<<<<<<<<<<<<&= lt;

 

Text now looks like:

 

namespace PT

{

  typedef TypeList<

    Statement<Assign<EAsgn::Variable> >

    = >::Result          = TFoo;

 

typedef TypeList<

    Statement<Assign<EAsgn::Variable> >,

    Statement<Symbol<Parameter<EParm::Overload> > = >,

    Statement<Symbol<Parameter<EParm::Local> > = >,

    = Statement<Instance>

    = >::Result          &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;            =    TStmtKindSet;

}

 

Observe line 7 indents incorrectly to column = 0.

 

Saving the buffer, starting a new emacs 23.1.96, = visit "bug.H", [TAB] on line

7 re-indents correctly.

------=_NextPart_001_0059_01CAE849.ABEE7AB0-- ------=_NextPart_000_0058_01CAE849.ABEE7AB0 Content-Type: text/plain; name="bug.H" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug.H" namespace PT { typedef TypeList< Statement >, Statement > >, Statement > >, Statement >::Result TStmtKindSet; } ------=_NextPart_000_0058_01CAE849.ABEE7AB0-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 03 18:36:55 2011 Received: (at 6066-done) by debbugs.gnu.org; 3 Oct 2011 22:36:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAr82-0000J3-KO for submit@debbugs.gnu.org; Mon, 03 Oct 2011 18:36:55 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAr81-0000Iv-6D for 6066-done@debbugs.gnu.org; Mon, 03 Oct 2011 18:36:54 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RAr6d-0006ZT-44; Mon, 03 Oct 2011 18:35:27 -0400 From: Glenn Morris To: 6066-done@debbugs.gnu.org Subject: Re: bug#6066: Incorrect C++ indentation in emacs 23.1.96 References: <005701cae884$584d52b0$08e7f810$@net> X-Spook: president ASDIC BCCI Guantanamo Ft. Knox eternity server X-Ran: (HXTQpt54hVn'PxevU;yK (Bob's message of "Fri, 30 Apr 2010 09:44:04 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6066-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Version: 24.1 I can reproduce this in Emacs 23.3, but not in the current trunk, so it looks like it has been fixed. From unknown Wed Jun 18 23:13:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Nov 2011 11:24:03 +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