[GRASS5] Code Formatting
Hamish
hamish_nospam at yahoo.com
Sat Apr 22 08:47:10 EDT 2006
[indent rules]
> > > Any objections to changing:
> > >
> > > -bli1 -> -bli0
> > > -br -> -bl
> >
> > translation:
> > '{' comes on next line after if,for etc instead of "if {"
> > Structs, functions already do this (-bls)
>
> That's the -br -> -bl change.
>
> Changing -bli1 -> -bli0 means that braces are aligned with the command
> rather than being an extra space in, i.e.
>
> if (...)
> {
> ...
> }
>
> rather than:
>
> if (...)
> {
> ...
> }
>
> Having braces aligned makes it easier to do manual alignment, as
> everything is then aligned to a multiple of 4 columns. It's also
> easier in terms of configuring Emacs' auto-formatting, which expects
> everything to be specified as multiples of the indentation step.
Oh, -bli1 is definitely wrong in that case. From my reading of the
indent man page, I thought with -br a -bli3 would do "if() {", hence
the -bli1. If using -bl instead of -br it should surely be -bli0.
Hamish
More information about the grass-dev
mailing list