all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: EScott@nyiso.com
Cc: help-gnu-emacs@gnu.org, help-gnu-emacs-bounces+escott=nyiso.com@gnu.org
Subject: Re: code beautification
Date: Thu, 2 Dec 2004 11:28:29 -0500	[thread overview]
Message-ID: <OF9023D271.91E5AFC1-ON85256F5E.005A59B0-85256F5E.005A7FF1@nyiso.com> (raw)
In-Reply-To: <20041202163247.62977e4a@Woody>


[-- Attachment #1.1: Type: text/plain, Size: 884 bytes --]

help-gnu-emacs-bounces+escott=nyiso.com@gnu.org 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
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

[-- Attachment #1.2: Type: text/html, Size: 1278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

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

  parent reply	other threads:[~2004-12-02 16:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-02 15:32 code beautification Thomas Ruschival
2004-12-02 16:27 ` Henrik S. Hansen
2004-12-02 22:27   ` Thomas Ruschival
2004-12-02 16:28 ` EScott [this message]
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

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

  git send-email \
    --in-reply-to=OF9023D271.91E5AFC1-ON85256F5E.005A59B0-85256F5E.005A7FF1@nyiso.com \
    --to=escott@nyiso.com \
    --cc=help-gnu-emacs-bounces+escott=nyiso.com@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.