From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: suvayu ali Newsgroups: gmane.emacs.help Subject: Re: how to change the indentation style of emacs Date: Sun, 23 Jan 2011 13:56:29 +0100 Message-ID: References: <384843.62270.qm@web30906.mail.mud.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1295787439 9973 80.91.229.12 (23 Jan 2011 12:57:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 Jan 2011 12:57:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Anand Dhanakshirur Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 23 13:57:15 2011 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.69) (envelope-from ) id 1PgzVK-0002Gt-Kr for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Jan 2011 13:57:14 +0100 Original-Received: from localhost ([127.0.0.1]:47772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgzVJ-00043h-Q4 for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Jan 2011 07:57:13 -0500 Original-Received: from [140.186.70.92] (port=55786 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgzUy-00043P-Cj for help-gnu-emacs@gnu.org; Sun, 23 Jan 2011 07:56:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgzUx-0008JQ-24 for help-gnu-emacs@gnu.org; Sun, 23 Jan 2011 07:56:52 -0500 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:34090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgzUw-0008JI-Sh for help-gnu-emacs@gnu.org; Sun, 23 Jan 2011 07:56:50 -0500 Original-Received: by fxm12 with SMTP id 12so3364236fxm.0 for ; Sun, 23 Jan 2011 04:56:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=l41MU2DFJ3Z5+NySD4P4PItauiq3mohS4PjnBSqWY/o=; b=t+trm1LnS9ytQclg3vC7L59p0mZCu4q0QmGtS5fuAI2rdy5qbhWh9kwUhq7GRMcN++ ktrTP9quqmm9dHI3scgVN46rA6758UNSsiGVinGC7sj60aXxBpen+5xngTm9c9YvaVon cK2X2YeUE7lBVQ5cW/jR53rEvQPvRpbi//06w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=QSgEr8BbDRQhU372m2uo6dyc2raf1U2Lhojusvesy5jO3rNc8STtWXG6StbKPIwiTt 2sR/XjrXT88YOsIWmzAGSxDA0ScMJKs999Ye9v82XAEPx+kV6Mrhozq+oJg1Ak23+V/A 8jSLwKMrzPp+f+kdMiIYmYPKPo8bMRJtxx8YY= Original-Received: by 10.223.86.1 with SMTP id q1mr2967283fal.107.1295787410032; Sun, 23 Jan 2011 04:56:50 -0800 (PST) Original-Received: by 10.223.71.207 with HTTP; Sun, 23 Jan 2011 04:56:29 -0800 (PST) In-Reply-To: <384843.62270.qm@web30906.mail.mud.yahoo.com> X-Google-Sender-Auth: OxE4jIrN9x6mC6OpGDqDxg6G2UM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:78673 Archived-At: On Sat, Jan 22, 2011 at 4:22 PM, Anand Dhanakshirur wrote: > Hi, > I am using emacs for c and c++ files. > > 1. Presently(default), In a C program, > after "for" loop, the next line(the next line starting with > "{" is indented(shifted) by 2 spaces. > I want to change this. > I want the next line is not shifted by 2 spaces when i press TAB key.(for= indentation) > basically > Now it is, for (i=3D0;i<10; i++) > =A0 =A0 =A0 =A0 =A0 =A0 { > =A0 =A0 =A0 =A0 =A0 =A0 } > > I want this to be changed as > =A0 =A0 =A0 =A0 =A0 for (i=3D0; i<10;i++) > > 2 .One more thing want to do. > after opening for loop of if condition, > the next line is getting shiftedby 2 spaces. > I want the next line to be shifted by 4 spaces. > > How to do these 2 things? > You can choose indentation styles by using `C-c . STYLE ' where style can be tab completed. For more details you can look in the info manual section 26.3.5 (Programs > Program Indent > Custom C Indent > Customising C Indentation). If nothing suits you, I think you can even define your own style. --=20 Suvayu Open source is the future. It sets us free.