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

[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: Leo
Subject: bug#11165: 24.0.95; c-indent-new-comment-line bug or feature?
Date: Tue, 17 Apr 2012 21:57:52 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (Mac OS X 10.6.8)

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.

Leo





reply via email to

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