[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Code formatting
From: |
Tom Tromey |
Subject: |
Re: Code formatting |
Date: |
23 Oct 2000 12:32:32 -0600 |
>>>>> "Mark" == Mark Wielaard <address@hidden> writes:
Mark> I am still a bit confused about what the unofficial coding style is.
Mark> Has someone documented somewhere?
Mark> How do I tell emacs to do the right thing?
libgcj has a fairly consistent style throughout (there are some
divergences, mostly due to a bug in an earlier version of Emacs).
Classpath has a much wider range of styles.
My understanding is that there are a few ok styles. They are all
derived from the GNU C style. The differences seem to be:
* Whether methods are indented or put in the left column
* Whether there is a space before a '(' in a method call
I don't know that it has been written down anywhere.
As to Emacs, I do (c-set-style "GNU") and then do
(c-set-offset 'inline-open 0) in my java-mode-hook.
This, plus knowing when to hit Enter and Space, makes Emacs give me
the right style automatically.
Tom