logo       

Re: C formatting: msg#00892

emacs.help

Subject: Re: C formatting

Oodini <svdbg@xxxxxxx> writes:

> Well, it doesn't do exactly what I want.
> After the "if", when I press Enter, Emacs put an extra indent, whereas
> I want it to put the cursor under the "if". I guess it supposes I put
> the opening brace af the end of the line where there is the "if".

Did you try typing the open brace? It might move to the left.

If it doesn't, you can still try TAB after typing the open brace.

I guess if there is no brace after if, you do want the next line to
be indented. So you want:

if (some_condition)
some_action;

instead of

if (some_condition)
some_action;

Right? Obviously, Emacs can't know whether you will be typing a
brace or not, after you hit RET.

--
Ambibibentists unite!


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise