From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: having problems with indentation in c++-mode Date: Sun, 08 Feb 2009 15:18:23 +0100 Organization: A noiseless patient Spider Message-ID: References: <46eb1c48-8ab2-4e62-86f4-242b8e417dcd@p37g2000yqd.googlegroups.com> <642d6c84-e50a-47cd-8341-7fb02f6ebce1@x38g2000yqj.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1234104091 30534 80.91.229.12 (8 Feb 2009 14:41:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Feb 2009 14:41:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 08 15:42:46 2009 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.50) id 1LWAro-0007oE-BJ for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Feb 2009 15:42:40 +0100 Original-Received: from localhost ([127.0.0.1]:51843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWAqV-0007yQ-3h for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Feb 2009 09:41:19 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!news.in2p3.fr!in2p3.fr!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!news.motzarella.org!motzarella.org!rileyrgdev.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 55 Original-X-Trace: news.eternal-september.org U2FsdGVkX1+UqDb8FrH/Q7n8LkjE4Hcj0QVuS1WFgAAR/m8c43ndrKc3aXdnIeHOxhffBbt0dmbRcNaGjTTP+M7ruO+dGC3uhzsm2JLKqSZV3IwtUf/WnAJw6AJC8VFx4ekJMKD1R6PHlSJ7mnEvqQ== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Sun, 8 Feb 2009 14:18:24 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19S0BjanAsa8oYYS4fXkZfcLIISdkUUXsUd4IGcadXWcw== Cancel-Lock: sha1:b+92GpdF8tjx12D/dpQRZgpEmbA= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:166694 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:62003 Archived-At: luca.pamparana@gmail.com writes: > On Feb 8, 10:07 am, Alan Mackenzie wrote: >> luca.pampar...@gmail.com wrote: >> > Hello everyone, >> > I would like to set the indentation level to 4 characters and I am >> > having trouble achieving this in the c++-mode. I have looked on the >> > web and used the most common template that is found but the smart >> > indentation always indents at 2 spaces...no matter what I set the tab- >> > width or the indent level. >> >> [ .... ] >> >> > I can set the tab-width or the indent-level to whatever number but it >> > does not help. It always indents at 2 spaces. >> >> > I am an emacs newbie, so I am sure I have missed something basic. I >> > would be grateful for any help you might give me. >> >> The magic document is the CC Mode manual, chapter "Getting Started". >> >> The variable you need to set is `c-basic-offset'.  Here's what this fine >> manual says: >> >> c-basic-offset >>      This Lisp variable holds an integer, the number of columns CC Mode >>      indents nested code.  To set this value to 6, customize >>      `c-basic-offset' or put this into your `.emacs': >> >>           (setq c-basic-offset 6) >> >> If you can't get this working, come back again. >> >> Best of luck! >> >> > Cheers, >> > Luca >> >> -- >> Alan Mackenzie (Nuremberg, Germany). > > That works. You are awesome! > > Thanks, > Luca Also look up c-set-style e.g (c-set-style "linux") -- important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday. ~Dennis Gabor, Innovations: Scientific, Technological and Social, 1970