all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: Guido Van Hoecke <guivho@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Trying to use only tabs for indenting c# files - csharp-mode error?
Date: Sun, 08 Jan 2012 20:06:42 +0100	[thread overview]
Message-ID: <87ehvanhdp.fsf@wanadoo.es> (raw)
In-Reply-To: <CAEySM9GNH9Fgb17KdPvTiWp+tqbY5eXyxeEkvey5CeFqkbMj8A@mail.gmail.com> (Guido Van Hoecke's message of "Sun, 8 Jan 2012 14:01:38 +0100")

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)



  parent reply	other threads:[~2012-01-08 19:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08 13:01 Trying to use only tabs for indenting c# files - csharp-mode error? Guido Van Hoecke
2012-01-08 14:58 ` Óscar Fuentes
2012-01-08 15:49   ` Guido Van Hoecke
2012-01-08 17:29 ` PJ Weisberg
2012-01-08 19:06 ` Óscar Fuentes [this message]
2012-01-08 19:19   ` Guido Van Hoecke
     [not found] <mailman.1451.1326027725.15002.help-gnu-emacs@gnu.org>
2012-01-14 18:32 ` Uday Reddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehvanhdp.fsf@wanadoo.es \
    --to=ofv@wanadoo.es \
    --cc=guivho@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.