From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: une Newsgroups: gmane.emacs.help Subject: Formatting code text Date: Sat, 18 Nov 2006 01:42:09 -0800 (PST) Message-ID: <7416552.post@talk.nabble.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1163845713 19925 80.91.229.2 (18 Nov 2006 10:28:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Nov 2006 10:28:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 18 11:28:30 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GlNQt-0005gq-IP for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Nov 2006 11:28:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlNQt-0001ux-0n for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Nov 2006 05:28:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GlMsC-0006S7-FD for help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 04:52:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GlMsA-0006RM-7F for Help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 04:52:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlMs9-0006R5-Es for Help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 04:52:29 -0500 Original-Received: from [72.21.53.35] (helo=talk.nabble.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GlMs9-0002l7-Ex for Help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 04:52:29 -0500 Original-Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GlMi9-0006at-4A for Help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 01:42:09 -0800 Original-To: Help-gnu-emacs@gnu.org X-Nabble-From: andrew.dunkin7424@fire.nsw.gov.au X-Mailman-Approved-At: Sat, 18 Nov 2006 05:26:55 -0500 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:38796 Archived-At: When writing code in C++ or Java I notice that I can get the code all nicley aligned and indented correctly by simply adding a comment at the end of each line of code. As you enter the //, the line of code moves to its correct alignment. What I have been doing is writing my code and periodically tidying it up by adding // at the end of every line of code. My question is, can I speed this aligning and indenting process up by formatting the entire file using one command? Emacs obviously knows how much each line should be indented, but doing it one line at a time by adding // is laborious. PS - I did not mean to cross post, my first post was in the Gnu Emacs forum. Not sure how this website works yet. Sorry. -- View this message in context: http://www.nabble.com/Formatting-code-text-tf2658909.html#a7416552 Sent from the Emacs - Help mailing list archive at Nabble.com.