From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Bob" Newsgroups: gmane.emacs.bugs Subject: bug#6066: Incorrect C++ indentation in emacs 23.1.96 Date: Fri, 30 Apr 2010 09:44:04 -0700 Message-ID: <005701cae884$584d52b0$08e7f810$@net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0058_01CAE849.ABEE7AB0" X-Trace: dough.gmane.org 1272646564 16181 80.91.229.12 (30 Apr 2010 16:56:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Apr 2010 16:56:04 +0000 (UTC) To: 6066@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 30 18:56:00 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O7tVN-0004md-RZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Apr 2010 18:55:58 +0200 Original-Received: from localhost ([127.0.0.1]:54298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7tVN-0008AF-5R for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Apr 2010 12:55:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7tVJ-00089E-3G for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:55:53 -0400 Original-Received: from [140.186.70.92] (port=43766 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7tVG-000875-Kg for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:55:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7tVE-0001ga-NR for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:55:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41508) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7tVE-0001gI-LV for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2010 12:55:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O7tKo-00051U-EG; Fri, 30 Apr 2010 12:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Bob" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Apr 2010 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6066 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: "'Emacs bug Tracking System'" Original-Received: via spool by submit@debbugs.gnu.org id=B.127264585819286 (code B ref -1); Fri, 30 Apr 2010 16:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Apr 2010 16:44:18 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 30 Apr 2010 12:45:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36608 Archived-At: 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--