[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: code indentation
From: |
Nic Ferrier |
Subject: |
Re: code indentation |
Date: |
27 Sep 2002 20:53:20 +0100 |
Giannis Georgalis <address@hidden> writes:
> Thank you all very much for your accurate answers on my
> serialVersionUID question.
>
> YASQ (Yet Another Short Question) about code indentation;
>
> I've read some old archives on the list about the indentation of the
> code, so I came up with the following java-mode-hook in my .emacs:
>
> (add-hook 'java-mode-hook
> (function (lambda()
> (c-set-style "GNU")
> (c-set-offset 'inline-open 0)
> (setq c-basic-offset 2))))
>
> But ... I've noticed major differences from this indentation among
> different implementations of classes. Is the above ok for classpath?
> Additionally, as I've read the GNU coding standards, a function (method)
> definition should be like:
>
> public static void
> sampleMethod(String a)
> {
> ...
>
> For the only reason that we should be able to "jump" to the function by
> a search-regexp(^sampleMethod). Provided that c/etags exist as a tool
> for that specific reason, I'm asking permition to change(*) the style to:
>
> public static void sampleMethod(String a)
> {
>
> which I consider more "consistent" (IMHO).
>
> (*) to java.io.* classes that I'm working.
This is fine. We have actually defined a bunch of java specific
caveats to the coding rules and I'm going to produce an indent
program that pretty-prints using them.
I've not had time to do that up to now... I may take a different
approach than patching gnu-indent (which is what I was going to do)
and instead write a java program to do it.
I will (probably before I get the chance to write a pretty-ifier)
update the coding standards document.
Nic
- code indentation, Giannis Georgalis, 2002/09/27
- Re: code indentation,
Nic Ferrier <=
- Re: [Classpath] Re: code indentation, C. Scott Ananian, 2002/09/27
- Re: [Classpath] Re: code indentation, Nic Ferrier, 2002/09/27
- Re: [Classpath] Re: code indentation, Giannis Georgalis, 2002/09/27
- Re: [Classpath] Re: code indentation, Nic Ferrier, 2002/09/28
- Re: [Classpath] Re: code indentation, C. Scott Ananian, 2002/09/29
- Re: [Classpath] Re: code indentation, Giannis Georgalis, 2002/09/29
Re: code indentation, Brian Jones, 2002/09/28