|
Re: C formatting: msg#00888emacs.help
Kai Großjohann a écrit: I suggest to try C-c C-o on the first line that has wrong indentation I started from what an user answer here gave me: (add-hook 'c-mode-hook (function (lambda () (c-set-style "bsd") (setq c-basic-offset 4) )) ) and then what what you said: C-x C-o I get the the statement Syntactic symabol to change: substatement I hit Enter... substatement offset (default +): I put 0, and then I get the *wanted behaviour*. C-x ESC ESC redo (c-set-offset (quote substatement) 0 nil) So I modify my .emacs: (add-hook 'c-mode-hook (function (lambda () (c-set-style "bsd") (setq c-basic-offset 4) (c-set-offset 0) )) ) But then I obtain a different behaviour. Typically, after an "if", when I go on a new line to do my opening brace, and hit Tab, the offset is 12 characters (8 char tab, and four characters). You didn't say which version of Emacs you are using. I'm assuming 21.2.1 -- . . . .:::. ### \|/ ` ___ ' :(o o): . (o o) (o o) - (O o) - ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: C formatting: 00888, Oodini |
|---|---|
| Next by Date: | Re: C formatting: 00888, chris.danx |
| Previous by Thread: | Re: C formattingi: 00888, Kai Großjohann |
| Next by Thread: | Re: C formatting: 00888, Kai Großjohann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |