From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Suhas Pai Newsgroups: gmane.emacs.help Subject: indent-region to indent comments Date: Wed, 10 Dec 2003 11:56:20 -0800 (PST) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200312101956.hBAJuK60013284@burbank.qualcomm.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1071086387 3647 80.91.224.253 (10 Dec 2003 19:59:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Dec 2003 19:59:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 10 20:59:43 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUAUo-0007LW-00 for ; Wed, 10 Dec 2003 20:59:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AUBRQ-0007aJ-Lo for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Dec 2003 16:00:16 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AUBPj-0007Dl-Tn for help-gnu-emacs@gnu.org; Wed, 10 Dec 2003 15:58:31 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AUBP9-0006uo-OT for help-gnu-emacs@gnu.org; Wed, 10 Dec 2003 15:58:26 -0500 Original-Received: from [129.46.51.58] (helo=numenor.qualcomm.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AUBP9-0006tl-2G for help-gnu-emacs@gnu.org; Wed, 10 Dec 2003 15:57:55 -0500 Original-Received: from burbank.qualcomm.com (burbank.qualcomm.com [129.46.216.153]) by numenor.qualcomm.com (8.12.10/8.12.5/1.0) with ESMTP id hBAJuPVY010179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Dec 2003 11:56:26 -0800 (PST) Original-Received: from burbank.qualcomm.com (localhost [127.0.0.1]) by burbank.qualcomm.com (8.12.10/8.12.3/1.0) with ESMTP id hBAJuOKK013287 for ; Wed, 10 Dec 2003 11:56:24 -0800 (PST) Original-Received: (from spai@localhost) by burbank.qualcomm.com (8.12.10/8.12.1/Submit) id hBAJuK60013284; Wed, 10 Dec 2003 11:56:20 -0800 (PST) Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15138 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15138 If I mark a region and indent it, I find that it only idents the source lines and not the comment lines. If my comment-column is set, why the indenting skips comments? This will save me ton of time having to do each one using "esc ;". I could always write a macro but I don't know how to bind a macro to a key. Please help. Before: ------- int main(int argc, char **argv) { int a = 5; // first comment double b = 5.0; // second comment long c = 3; // third comment b = a + c; // so as not to get unused variable error return 0; } Expect after ident-region: -------------------------- int main(int argc, char **argv) { int a = 5; // first comment double b = 5.0; // second comment long c = 3; // third comment b = a + c; // so as not to get unused variable error return 0; } Thanks, Suhas