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

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

Re: Trying to use only tabs for indenting c# files - csharp-mode error?


From: Guido Van Hoecke
Subject: Re: Trying to use only tabs for indenting c# files - csharp-mode error?
Date: Sun, 8 Jan 2012 20:19:42 +0100

On Sun, Jan 8, 2012 at 20:06, Óscar Fuentes <ofv@wanadoo.es> wrote:
> Guido Van Hoecke <guivho@gmail.com> writes:
>
> [snip]
>
>> namespace Application
>> {
>> ==public class MyClass
>> =={
>> ====public string MyString;
>> ====public MyClass ()
>> ===={
>> ====}
>> ==}
>> }
>>
>> So obviously neither tab-width nor indent-tabs-mode are obeyed nor
>> respected!
>
> All your examples here makes me think that csharp-mode is indenting by
> two spaces per level. As PJ says, tabs will not be used unless the line
> is preceded by `tab-width' spaces (8 in your case). If you set tab-width
> to 4, I expect to see tabs used for the most deeply indented lines on
> the example quoted above.
>
> Put this in your .emacs and see if it makes a difference:
>
> (defun my-csharp-mode-fn ()
>  (c-set-style "C#")
>  (setq tab-width 4)
>  (setq indent-tabs-mode t))
>
> (add-hook 'csharp-mode-hook 'my-csharp-mode-fn)

It makes no difference.


Guido

--
I prefer the most unjust peace to the most righteous war.
                -- Cicero

Even peace may be purchased at too high a price.
                -- Poor Richard

http://vanhoecke.org ... and go2 places!



reply via email to

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