[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-dev] Re: indentation
From: |
Mathieu Roy |
Subject: |
[Savannah-dev] Re: indentation |
Date: |
03 Sep 2003 16:36:41 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Nic <address@hidden> a tapoté :
> Mathieu Roy <address@hidden> writes:
>
> > Hi,
> >
> > After discussion with the CERN team, we agreed to change this
> >
> > function example () {
> > print "bla";
> > }
> >
> > if (1 != 1) {
> > print "blo";
> > }
> >
> > to
> >
> >
> > function example ()
> > {
> > print "bla";
> > }
> >
> > if (1 != 1)
> > {
> > print "blo";
> > }
> >
> > Which has the advantage of putting the corresponding { } on the same
> > column. I think this is the GNU recommandation. If I'm mistaking,
> > please tell me.
>
> GNU coding style is not quite that, it would be better IMHO to use
> GNU coding style which is this:
>
> function example ()
> {
> print "bla";
> if (1 != 1)
> {
> print "blo";
> }
> }
>
> Top-level (ie: function) bodys are not indented, all other blocks are
> indented. The indentation level is 2 spaces.
Ok, I wonder why emacs did not picked the appropriate indentation
space.
Anyway, I think we will use indent to automatically ident all the code
appropriately (I hope it works well).
Thanks for the tip,
Regards,
--
Mathieu Roy
Homepage:
http://yeupou.coleumes.org
Not a native english speaker:
http://stock.coleumes.org/doc.php?i=/misc-files/flawed-english