unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Ugly C++ code needs to be reformated - is emacs the right tool?
@ 2007-12-07 18:05 jgombos
  2007-12-08 11:11 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: jgombos @ 2007-12-07 18:05 UTC (permalink / raw)
  To: Help-gnu-emacs


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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-08 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).