bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5530: Emacs 23.1 "ESC C-q" behaves badly ; Emacs 21.2 works Ok


From: Bob
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

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<class _DataType,class _ItemList,class _Tail>

  struct FindConversionList

  {

    typedef Tl::IF<

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

      _ItemList,

      FindConversionList<_DataType,_Tail>::Result

      >::Result                                                                                        Result;

  };

}

---------------- CUT -------------------

 

 

Attachment: Foo.cpp
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]