emacs and C++ { } indenting

Mike Small smallm at panix.com
Wed Feb 25 12:00:27 EST 2004


Try fiddling with your C default style...  

 http://www.gnu.org/software/emacs/manual/html_node/emacs_280.html

On Wed, Feb 25, 2004 at 11:36:14AM -0500, David Kramer wrote:
> Emacs C++ mode seems to insist on K&R style indenting of brackets like
> 
> void Foo:Bar(Baz myBaz) {
> 	// code here
> }
> 
> 
> I prefer the ANSI style like
> 
> void Foo:Bar(Baz myBaz) 
> {
>         // code here
> }
> 
> emacs goes nuts indenting everyting too much when I do that too.  So I 
> have to write my program using K&R, then go back and fix the brackets 
> afterwards.
> 
> What is the magic Lisp incantation to fix this?  I found something SingTFW 
> but it didn't work.
> 
> -- 
> DDDD   
> DK KD  Yesterday's code should be as good as we could make it yesterday.
> DKK D  The fact that we know more today, and are more capable today,
> DK KD  is good news about today, not bad news about yesterday.
> DDDD                                - Ron Jeffries  www.XProgramming.com
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://www.blu.org/mailman/listinfo/discuss

-- 
Mike Small
smallm at panix.com



More information about the Discuss mailing list