unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5530: Emacs 23.1 "ESC C-q" behaves badly ; Emacs 21.2 works Ok
@ 2010-02-05 18:05 Bob
  2010-02-07  6:29 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Bob @ 2010-02-05 18:05 UTC (permalink / raw)
  To: 5530


[-- Attachment #1.1: Type: text/plain, Size: 1515 bytes --]

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 #1.2: Type: text/html, Size: 6494 bytes --]

[-- Attachment #2: Foo.cpp --]
[-- Type: text/plain, Size: 504 bytes --]

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;
  };
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#5530: Emacs 23.1 "ESC C-q" behaves badly ; Emacs 21.2 works Ok
  2010-02-05 18:05 bug#5530: Emacs 23.1 "ESC C-q" behaves badly ; Emacs 21.2 works Ok Bob
@ 2010-02-07  6:29 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-02-07  6:29 UTC (permalink / raw)
  To: Bob; +Cc: 5530

> 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:
>
> 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.

I can reproduce the problem with Emacs 23.1, but not with the latest
version of Emacs from the repository; so this has apparently already
been fixed (presumably by Alan).  Thanks for the bug report.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-07  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-05 18:05 bug#5530: Emacs 23.1 "ESC C-q" behaves badly ; Emacs 21.2 works Ok Bob
2010-02-07  6:29 ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).