From: Eli Zaretskii <eliz@gnu.org>
To: Help-gnu-emacs@gnu.org
Subject: Re: Ugly C++ code needs to be reformated - is emacs the right tool?
Date: Sat, 08 Dec 2007 13:11:52 +0200 [thread overview]
Message-ID: <uodd1xwxz.fsf@gnu.org> (raw)
In-Reply-To: <14217366.post@talk.nabble.com> (message from jgombos on Fri, 7 Dec 2007 10:05:34 -0800 (PST))
> 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".
prev parent reply other threads:[~2007-12-08 11:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 18:05 Ugly C++ code needs to be reformated - is emacs the right tool? jgombos
2007-12-08 11:11 ` Eli Zaretskii [this message]
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=uodd1xwxz.fsf@gnu.org \
--to=eliz@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.