unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Bob" <purchasebyemail1@comcast.net>
To: 5530@debbugs.gnu.org
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	[thread overview]
Message-ID: <000301caa68d$c9922c40$5cb684c0$@net> (raw)


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

             reply	other threads:[~2010-02-05 18:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 18:05 Bob [this message]
2010-02-07  6:29 ` bug#5530: Emacs 23.1 "ESC C-q" behaves badly ; Emacs 21.2 works Ok Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000301caa68d$c9922c40$5cb684c0$@net' \
    --to=purchasebyemail1@comcast.net \
    --cc=5530@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).