From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Quokka Newsgroups: gmane.emacs.help Subject: Re: Please help: How to reformat existing c++ files using emacs Date: Wed, 30 Mar 2005 09:43:45 +0800 Message-ID: <424a0456$0$13871$5a62ac22@per-qv1-newsreader-01.iinet.net.au> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1112147349 24669 80.91.229.2 (30 Mar 2005 01:49:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2005 01:49:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 30 03:49:05 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGSJs-0002j7-VW for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Mar 2005 03:48:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGSaH-0006uB-KM for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Mar 2005 21:05:29 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-south.connect.com.au!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.6.0.104 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 23 Original-NNTP-Posting-Host: 203.59.9.243 Original-X-Trace: 1112147030 per-qv1-newsreader-01.iinet.net.au 13871 203.59.9.243 Original-Xref: shelby.stanford.edu gnu.emacs.help:129737 Original-To: help-gnu-emacs@gnu.org 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:25290 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25290 Jochen Küpper wrote: > "Xiaopeng Xiong" writes: > > >>formatting a single file is enough for me. If you know any command >>to do so, please help! > > > C-PgUp C- C-PgDn M-x indent region or similar... Alternatively use a seperate tool such as gnu indent... http://www.gnu.org/software/indent/indent.html I find this a much better way to go for indenting multiple files... also indent will do formating that emacs will not! such as moving the position of braces. Although emacs is the One True Editor.. sometimes it is better to use other tools. Paul