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

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

Re: C formatting


From: Oodini
Subject: Re: C formatting
Date: Sat, 28 Dec 2002 13:31:18 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.0.1) Gecko/20020823 Netscape/7.0

chris.danx a écrit:
Oodini wrote:

void function(int x, int y)
{
     blabla;
     if (...)
     {
          blabla
          blabla
     }
     else
          blabla;
}


This works ok for me and produces indentation like above

(add-hook 'c-mode-hook (function (lambda () (c-set-style "bsd") (setq c-basic-offset 4))))

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".

--
 .      .
 .  .:::.          ###           \|/        `  ___  '
   :(o o):  .     (o o)         (o o)      -  (O o)  -
ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-


reply via email to

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