help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tabs and Spaces


From: Chris Gordon-Smith
Subject: Re: Tabs and Spaces
Date: 25 May 2009 15:58:55 GMT
User-agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.26-2-686 (i686))

Teemu Likonen <tlikonen@iki.fi> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]