[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ugly C++ code needs to be reformated - is emacs the right tool?
From: |
Eli Zaretskii |
Subject: |
Re: Ugly C++ code needs to be reformated - is emacs the right tool? |
Date: |
Sat, 08 Dec 2007 13:11:52 +0200 |
> Date: Fri, 7 Dec 2007 10:05:34 -0800 (PST)
> From: jgombos <nabble.forum.jog@spamgourmet.com>
> Cc:
>
> New coding standard mandate forces 80 column limit (puke). So I need a tool
> to split long lines intelligently, so clean and readable breaks are made.
> The code is rough looking in other ways, because I've run some
> non-interactive sed scripts on it to do some replacements, so the resulting
> code is almost as ugly as machine generated code.
>
> I need an industrial strength pretty printer (though I hate to call it that
> because it implies the output is a publication). Is there any way to make
> emacs do this?
There probably is, but how about posting a sample of the ugly code
together with what you'd like it to become? Then Someone(TM) could
advise you how to set up various options in C Mode to reformat the
code to your liking. Also, how many lines are in the code you want to
reformat?
In general, you will probably need to use "C-M-\" followed by "M-q".