unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thomas Ruschival <t.ruschival@vivid-md.de>
Subject: code beautification
Date: Thu, 2 Dec 2004 16:32:47 +0100	[thread overview]
Message-ID: <20041202163247.62977e4a@Woody> (raw)

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

             reply	other threads:[~2004-12-02 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-02 15:32 Thomas Ruschival [this message]
2004-12-02 16:27 ` code beautification Henrik S. Hansen
2004-12-02 22:27   ` Thomas Ruschival
2004-12-02 16:28 ` EScott
2004-12-02 23:09 ` Leonardo Boiko
     [not found] <mailman.3121.1102005569.27204.help-gnu-emacs@gnu.org>
2004-12-02 22:22 ` Thomas Ruschival

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041202163247.62977e4a@Woody \
    --to=t.ruschival@vivid-md.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).