help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: code beautification


From: EScott
Subject: Re: code beautification
Date: Thu, 2 Dec 2004 11:28:29 -0500


address@hidden wrote on 12/02/2004 10:32:47 AM:

> I got a lot of old code that was produced by some IDE.
> the IDE used this indentation style
> if(1>2)
> {
>    printf("Hello World!");
> }
>
> I personally prefer the K&R c-style over this and furthermore I have
> the habit of putting curly braces after each if,for,while,do I don't
> like code like
> if (2<3)
>    printf("hello world");
>
> My problem is now I don't know how to build a regexp that works over
> several lines with backrefs.
>
> The "missing" Curly Braces are not important but changing the syle
> would be nice.
>
> Anyone an idea how to reformat code in that way?
>
> Thomas


M-x c-set-style

and choose K&R

> _______________________________________________
> Help-gnu-emacs mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]