From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: use.address@my.homepage.invalid (Chris Gordon-Smith) Newsgroups: gmane.emacs.help Subject: Re: Tabs and Spaces Date: 25 May 2009 15:58:55 GMT Organization: SimSoup Message-ID: <77vthvF1jts3gU1@mid.individual.net> References: <77vbbiF1jhhubU1@mid.individual.net> <7chbz9bdyu.fsf@pbourguignon.informatimago.com> <77vgiiF1jjcfrU1@mid.individual.net> <7czld19ttv.fsf@pbourguignon.anevia.com> <77vq0cF1jh3k6U1@mid.individual.net> <87vdnpmd60.fsf@iki.fi> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1243346666 23854 80.91.229.12 (26 May 2009 14:04:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2009 14:04:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 26 16:04:19 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 1M8xGK-0007r4-CD for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 16:04:16 +0200 Original-Received: from localhost ([127.0.0.1]:49401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8xGJ-0008Hu-RK for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 10:04:15 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-X-Trace: individual.net fa2gSOrpUSyEx9BatMyd4wGLbXk5UgTVAVfx+N4TWjvjwyIJaZ X-Orig-Path: not-for-mail Cancel-Lock: sha1:P1aOAQMEkVIE3n9xE/3jjp0/Pns= User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.26-2-686 (i686)) Original-Xref: news.stanford.edu gnu.emacs.help:169470 X-Mailman-Approved-At: Tue, 26 May 2009 10:02:21 -0400 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:64728 Archived-At: Teemu Likonen wrote: > On 2009-05-25 14:58 (UTC), Chris Gordon-Smith wrote: > >> C++. But I had already established before my original post that the >> standard emacs indenting would not suit me. Perhaps I should have >> mentioned this. > > Fortunately C++ indentation is very much configurable. There are several > predefined styles which you can change with "C-c ." (c-set-style) > command. If none of them suit you you can create your own. For more info > see the CC Mode info node > > C-h i d m CC Mode RET Thanks. I think the complicating factor for me is that I use my own syntax, with macros instead of curly brackets ({}). This is not generally liked in the C++ world, but it works well for me. For example:- #define THEN { // Macro for modified syntax // etc... int x = 10; if (x ==9) THEN // Do Something ELSEIF (x == 9) THEN // Do something else ELSE // Do yet another thisg ENDIF I doubt whether any of the existing indenting styles can cope with this, so I suppose I'll need to write a new configuration. Until I know how to do this, I would like a very simple behaviour in which pressing tab simply causes the relevant number of spaces to be inserted. Chris Gordon-Smith www.simsoup.info