unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: jgombos <nabble.forum.jog@spamgourmet.com>
To: Help-gnu-emacs@gnu.org
Subject: Ugly C++ code needs to be reformated - is emacs the right tool?
Date: Fri, 7 Dec 2007 10:05:34 -0800 (PST)	[thread overview]
Message-ID: <14217366.post@talk.nabble.com> (raw)


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?  I'm not interested in starting a lisp project, but if
there's some code out there I can grab, that would be excellent.

I tried to use Artistic Style (astyle), and it's just not manipulative
enough.  It will fix indentations, but doesn't split lengthy lines, and
doesn't mess with intra-statement whitespace.  

Tidy does a great job of taking very messy HTML and making it readable.  So
something along those lines but for C++ would be great.  I'm not too picky
about formatting details.. any of the mainstream styles are fine
(BSD/Allman, Whitesmith, K&R..)
-- 
View this message in context: http://www.nabble.com/Ugly-C%2B%2B-code-needs-to-be-reformated---is-emacs-the-right-tool--tf4963486.html#a14217366
Sent from the Emacs - Help mailing list archive at Nabble.com.

             reply	other threads:[~2007-12-07 18:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 18:05 jgombos [this message]
2007-12-08 11:11 ` Ugly C++ code needs to be reformated - is emacs the right tool? Eli Zaretskii

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=14217366.post@talk.nabble.com \
    --to=nabble.forum.jog@spamgourmet.com \
    --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.
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).