[vox-tech] emacs formatting

Charles McLaughlin cmclaughlin at ucdavis.edu
Fri May 13 10:06:02 PDT 2005


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.  The modes I'm mainly concerned about now are C/C++, PHP and 
Perl.

Here is an example of how I like to format things:

if(foo)
{
   doSomething();
}

but in some situations emacs formats code like this:

if(foo)
   {
     doSomething();
   }


apparently most of the world formats code like this:

if(foo) {
   doSomething();
}

That just doesn't work for me though. :)

Thanks in advance for any advice.

Charles


More information about the vox-tech mailing list