From: Leo <sd...@gm...> - 2012-04-17 13:59:09
|
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 |