From: "Bob" <purchasebyemail1@comcast.net>
To: 6066@debbugs.gnu.org
Subject: bug#6066: Incorrect C++ indentation in emacs 23.1.96
Date: Fri, 30 Apr 2010 09:44:04 -0700 [thread overview]
Message-ID: <005701cae884$584d52b0$08e7f810$@net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1556 bytes --]
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::Variable> >,)
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<Assign<EAsgn::Variable> >,
typedef TypeList<
Statement<Assign<EAsgn::Variable> >,
Statement<Symbol<Parameter<EParm::Overload> > >,
Statement<Symbol<Parameter<EParm::Local> > >,
Statement<Instance>
>::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<Assign<EAsgn::Variable> >
>::Result TFoo;
typedef TypeList<
Statement<Assign<EAsgn::Variable> >,
Statement<Symbol<Parameter<EParm::Overload> > >,
Statement<Symbol<Parameter<EParm::Local> > >,
Statement<Instance>
>::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.
[-- Attachment #1.2: Type: text/html, Size: 7185 bytes --]
[-- Attachment #2: bug.H --]
[-- Type: text/plain, Size: 237 bytes --]
namespace PT
{
typedef TypeList<
Statement<Assign<EAsgn::Variable> >,
Statement<Symbol<Parameter<EParm::Overload> > >,
Statement<Symbol<Parameter<EParm::Local> > >,
Statement<Instance>
>::Result TStmtKindSet;
}
next reply other threads:[~2010-04-30 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 16:44 Bob [this message]
2011-10-03 22:35 ` bug#6066: Incorrect C++ indentation in emacs 23.1.96 Glenn Morris
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='005701cae884$584d52b0$08e7f810$@net' \
--to=purchasebyemail1@comcast.net \
--cc=6066@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.