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#5530: Emacs 23.1 "ESC C-q" behaves badly ; Emacs 21.2 works Ok Date: Fri, 5 Feb 2010 10:05:22 -0800 Message-ID: <000301caa68d$c9922c40$5cb684c0$@net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0004_01CAA64A.BB6EEC40" X-Trace: ger.gmane.org 1265394574 2794 80.91.229.12 (5 Feb 2010 18:29:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Feb 2010 18:29:34 +0000 (UTC) To: 5530@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 05 19:29:22 2010 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 1NdSvh-00034q-Rg for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2010 19:29:22 +0100 Original-Received: from localhost ([127.0.0.1]:34402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdSvh-0000g5-6N for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2010 13:29:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdSuG-0008Nv-EJ for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:27:52 -0500 Original-Received: from [199.232.76.173] (port=50184 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdSuB-0008J3-Sw for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:27:47 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdSu9-0001hs-D3 for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:27:47 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35019) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NdSu9-0001hc-0R for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:27:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NdSZ8-0006Jx-2c; Fri, 05 Feb 2010 13:06:02 -0500 X-Loop: bug-gnu-emacs@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, 05 Feb 2010 18:06:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5530 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.126539312624279 (code B ref -1); Fri, 05 Feb 2010 18:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Feb 2010 18:05:26 +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 1NdSYX-0006JY-V3 for submit@debbugs.gnu.org; Fri, 05 Feb 2010 13:05:26 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NdSYW-0006JS-Uo for submit@debbugs.gnu.org; Fri, 05 Feb 2010 13:05:25 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:54159) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NdSYS-0001M8-1q for submit@debbugs.gnu.org; Fri, 05 Feb 2010 13:05:20 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdSYO-00086f-23 for submit@debbugs.gnu.org; Fri, 05 Feb 2010 13:05:18 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:33464) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NdSYN-000861-96 for submit@debbugs.gnu.org; Fri, 05 Feb 2010 13:05:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdSYM-0001Mf-RT for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:05:14 -0500 Original-Received: from [199.232.76.173] (port=42317 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdSYM-0001MK-Fr for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:05:14 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdSYI-00082H-N6 for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:05:13 -0500 Original-Received: from qmta09.emeryville.ca.mail.comcast.net ([76.96.30.96]:49845) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NdSYH-00081B-ON for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2010 13:05:10 -0500 Original-Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta09.emeryville.ca.mail.comcast.net with comcast id eE7j1d0041vN32cA9J59UG; Fri, 05 Feb 2010 18:05:09 +0000 Original-Received: from Cache ([71.202.16.94]) by omta22.emeryville.ca.mail.comcast.net with comcast id eJ6f1d00B21mHQP8iJ6f9Y; Fri, 05 Feb 2010 18:06:39 +0000 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acqmjcj6OxvnBj8iTqiT6c5OKUIYYw== Content-Language: en-us X-detected-operating-system: by monty-python.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, 05 Feb 2010 13:06:02 -0500 X-detected-operating-system: by monty-python.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:34917 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0004_01CAA64A.BB6EEC40 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0005_01CAA64A.BB6EEC40" ------=_NextPart_001_0005_01CAA64A.BB6EEC40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Indenting region does different indenting from indenting line in Emacs 23.1. Works nicely in Emacs 21.2. 1) Save the attached file as "Foo.cpp", or cut and paste below code into "Foo.cpp". 2) Visit "Foo.cpp" in Emacs 23.1 (no .emacs file required) 3) Get into c++ mode: ESC-m c++-mode 4) Put cursor on '{' at line 2 and indent the region: ESC C-q (c-indent-exp) Observe the "};" at line 23 now appears in column 1. 5) Now move cursor to "}' on line 23 and indent line: TAB (c-indent-line-or-region) Observe the "};" on line 23 moves to column 3. Repeat of 4 and 5 causes the "};" on line 23 to shift between column 1 and column 3. The "};" should always be in column 3 and not shift to column 1. Emacs 21.2 works correctly. Also note 21.2 indents line 22 ">::Result" to line up with the "typedef" of line 18 which in my opinion is nicer! ---------------- CUT ------------------- namespace PT { template< class _DataType, class _TypeTree = TConversionLengthTree > struct FindConversionList; template<_DataType> struct FindConversionList<_DataType,Tl::End> { typedef Tl::End Result; }; template struct FindConversionList { typedef Tl::IF< Tl::MemberOf<_ItemList,_DataType>::value, _ItemList, FindConversionList<_DataType,_Tail>::Result >::Result Result; }; } ---------------- CUT ------------------- ------=_NextPart_001_0005_01CAA64A.BB6EEC40 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Indenting region does different indenting from = indenting line in Emacs 23.1. Works nicely in Emacs 21.2.

 

1) Save the attached file as "Foo.cpp", = or cut and paste below code into "Foo.cpp".

 

2) Visit "Foo.cpp" in Emacs 23.1 (no = .emacs file required)

 

3) Get into c++ mode:

     ESC-m = c++-mode

 

4) Put cursor on '{' at line 2 and indent the = region:

     ESC C-q = (c-indent-exp)

 

     Observe the "};" = at line 23 now appears in column 1.

 

5) Now move cursor to "}' on line 23 and = indent line:

    TAB = (c-indent-line-or-region)

 

   Observe the "};" on line 23 = moves to column 3.

 

Repeat of 4 and 5 causes the "};" on line = 23 to shift between column 1 and column 3.

The "};" should always be in column 3 and = not shift to column 1.  Emacs 21.2 works correctly.

 

Also note 21.2 indents line 22 = ">::Result" to line up with the "typedef" of line 18 which in my opinion is = nicer!

 

---------------- CUT = -------------------

namespace PT

{

  template<

    class _DataType,

    class _TypeTree =3D = TConversionLengthTree

    >

  struct FindConversionList;

 

  template<_DataType>

  struct = FindConversionList<_DataType,Tl::End>

  {

    typedef = Tl::End           =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;     Result;

  };

     

  template<class _DataType,class = _ItemList,class _Tail>

  struct FindConversionList

  {

    typedef = Tl::IF<

      Tl::MemberOf<_ItemList,_DataType>::value,

      = _ItemList,

      FindConversionList<_DataType,_Tail>::Result

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

  };

}

---------------- CUT = -------------------

 

 

------=_NextPart_001_0005_01CAA64A.BB6EEC40-- ------=_NextPart_000_0004_01CAA64A.BB6EEC40 Content-Type: text/plain; name="Foo.cpp" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Foo.cpp" namespace PT { template< class _DataType, class _TypeTree = TConversionLengthTree > struct FindConversionList; template<_DataType> struct FindConversionList<_DataType,Tl::End> { typedef Tl::End Result; }; template struct FindConversionList { typedef Tl::IF< Tl::MemberOf<_ItemList,_DataType>::value, _ItemList, FindConversionList<_DataType,_Tail>::Result >::Result Result; }; } ------=_NextPart_000_0004_01CAA64A.BB6EEC40--