From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Vivek Dasmohapatra Newsgroups: gmane.emacs.help Subject: Re: Indentation in C Date: 22 Jan 2004 11:21:10 +0000 Organization: The Pepperfish Consortium Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <82r7xs5ivt.fsf@pepperfish.net> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074771214 9734 80.91.224.253 (22 Jan 2004 11:33:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2004 11:33:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 22 12:33:27 2004 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 1Ajd5T-000363-00 for ; Thu, 22 Jan 2004 12:33:27 +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 1Ajd3H-0007B9-Ar for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jan 2004 06:31:11 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!62.197.40.8!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: 62.197.40.8 Original-X-Trace: news.uni-berlin.de 1074771022 20915419 62.197.40.8 ([151522]) X-Orig-Path: salmon.pepperfish.net!not-for-mail User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Original-Xref: shelby.stanford.edu comp.emacs:82932 gnu.emacs.help:120327 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:16271 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16271 vsinha@purdue.edu (Varun Sinha) writes: > I was wondering how I could get the following done in EMACS- > 1) When I hit tab to indent, I'd like the tab to be made up of spaces. M-x customize-variable RET indent-tabs-mode RET Set it to off (nil). > 2) Right now, the curly braces are indented two spaces below the You can alter the indentation style by calling c-set-style M-x c-set-style RET You will can tab complete the available styles - BSD style is sounds close to what you want. You can control the amount of indentation by setting c-basic-offset M-x customize-variable RET c-basic-offset RET and setting it to 4. You can find a much more detailed example in http://rtfm.etla.org/emacs/dot.html look for "(defvar viveks-c-style" and "(setq c-mode-common-hook"