[Top][All Lists]

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

bug#11165: 24.0.95; c-indent-new-comment-line bug or feature?

From: Alan Mackenzie
Subject: bug#11165: 24.0.95; c-indent-new-comment-line bug or feature?
Date: Tue, 15 May 2012 16:50:39 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, Leo.

On Tue, Apr 17, 2012 at 09:57:52PM +0800, Leo wrote:
> On 2012-04-17 18:53 +0800, Alan Mackenzie wrote:
> > I think you've missed out some steps here.  When I do exactly that, I do
> > M-x c-mode on the opening splash screen (which isn't sensible), which is
> > read-only, preventing step 4.

> > What I tried was, instead of your step 4, creating a new buffer with C-x
> > b asdf.c, then setting the mode with M-x c-mode.

> Sorry for the splash screen. What you did instead is correct.

> > I do indeed see point at column 2, which is correct.  I think you might
> > have set the offset for "c" to 4 before creating the empty C buffer.
> > Indentation configuration is buffer local.

> > When I then repeat the C-c C-o c <ret> 4 <ret> I then get the second line
> > at offset 4, where it ought to be.

> I customise "c" after entering C mode so the customisation is effective.
> If you type M-j after /*, point is moved to the newline with 2 leading
> spaces. Now if you type TAB, it will go to column 4. so M-j is
> misbehaving i.e. it doesn't go to the right indentation.

> In contrast, M-x indent-new-comment-line following /* will move point to
> column 4 in the next line.

This is getting confusing.  I'm asking you at this point to read the
chapter "Config Basics" of the CC Mode manual.  About 36 lines down from
the top, it explains how setq'ing/customizing CC Mode's style variables
interacts with loading a buffer.

I don't think this is a bug.  When you've read that manual page, would
you please check exactly what you've done, and whether your buffer
indents as we both would like.

If it still seems wrong, could you give the exact description of how to
create the problem starting from emacs -Q (yes, I know this'll involve
some repetition).


> Leo

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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