From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jgombos Newsgroups: gmane.emacs.help Subject: Ugly C++ code needs to be reformated - is emacs the right tool? Date: Fri, 7 Dec 2007 10:05:34 -0800 (PST) Message-ID: <14217366.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197050779 19453 80.91.229.12 (7 Dec 2007 18:06:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2007 18:06:19 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 07 19:06:29 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J0haX-0002uJ-DY for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Dec 2007 19:06:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0haF-0007ei-VW for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Dec 2007 13:05:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J0hZx-0007a8-BY for help-gnu-emacs@gnu.org; Fri, 07 Dec 2007 13:05:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J0hZw-0007YL-L9 for Help-gnu-emacs@gnu.org; Fri, 07 Dec 2007 13:05:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0hZw-0007Y0-Gu for Help-gnu-emacs@gnu.org; Fri, 07 Dec 2007 13:05:36 -0500 Original-Received: from kuber.nabble.com ([216.139.236.158]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J0hZw-0002jD-3N for Help-gnu-emacs@gnu.org; Fri, 07 Dec 2007 13:05:36 -0500 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1J0hZu-0003Qo-Lj for Help-gnu-emacs@gnu.org; Fri, 07 Dec 2007 10:05:34 -0800 X-Nabble-From: nabble.forum.jog@spamgourmet.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49919 Archived-At: 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.