Thanks for all of the suggestions and comments. I did a little reading
on programming styles... it turns out my favorite style is called
BSD/Allman. :)
I played around with the emacs customize screen for a while, then ended
up manually added this entry in my .emacs file:
(setq
Hello,
I am hoping someone can point me in the write direction. I want to
change how emacs formats code. I'm very picky about spacing and
brackets. If I have to make the change for every mode that is fine, but
I'd prefer to make the change once and have it apply to all types of
code I use.
I can't resist...
On Fri 13 May 05, 10:06 AM, Charles McLaughlin [EMAIL PROTECTED] said:
Here is an example of how I like to format things:
if(foo)
{
doSomething();
}
This is my preferred style as well. I'm meeting more and more people who
prefer this style, so I think it's gaining
On Fri, May 13, 2005 at 01:19:07PM -0400, Peter Jay Salzman wrote:
if(foo)
{ doSomething();
}
which is heretical. ;)
Heh. Yeah, yuck. I'll do this for one-liners, sometimes, though:
if (foo) { do_something(); }
I think I mostly do that in PHP, though, where you end up mashing HTML
I'm an amateur when it comes to emacs hacks, but I suspect you'll need
to add appropriate lines for each mode to your ~/.emacs file. Probably
cut and paste will do much of it, though.
Jonathan
Charles McLaughlin wrote:
Hello,
I am hoping someone can point me in the write direction. I want to
On Fri, May 13, 2005 at 01:19:07PM -0400, Peter Jay Salzman wrote:
but in some situations emacs formats code like this:
if(foo)
{
doSomething();
}
*barf*!!!
This is the official GNU indentation style. It does have some nice things about
it... but lately I tend to use KR
On Fri, May 13, 2005 at 11:27:21AM -0700, Jonathan Stickel wrote:
Charles McLaughlin wrote:
Hello,
I am hoping someone can point me in the write direction. I want to
change how emacs formats code. I'm very picky about spacing and
brackets. If I have to make the change for every
On Friday 13 May 2005 11:16 am, Bill Kendrick wrote:
Heh. Yeah, yuck. I'll do this for one-liners, sometimes, though:
if (foo) { do_something(); }
Actually in PHP, C and Java you can omit the braces for a
single statement:
if (foo) do_something();
Or in Perl:
do_something() if