[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs BSD/Allman Style with 4 Space Tabs?
From: |
Will Parsons |
Subject: |
Re: Emacs BSD/Allman Style with 4 Space Tabs? |
Date: |
2 Nov 2012 00:21:29 GMT |
User-agent: |
slrn/0.9.9p1 (FreeBSD) |
hany wrote:
> Using this emacs lisp setting one ends up with BSD/Allman style braces but
> introduces tabs with 8 spaces.
>
> (add-hook 'c-mode-hook
> (lambda ()
> (c-set-style "linux")))
>
> How do I keep the Allman style braces but keep the tab spaces at 4?
For keeping the indentation at 4 spaces, I think all you should need
to do is stick into your c-mode-hook:
(setq c-basic-offset 4)
That's what I have, though I use "ellemtel" style rather than "linux" style.
However, you refer to "tabs" rather than "indentation", so perhaps I
misunderstand. If you are using tabs (i.e., ASCII <tab> characters),
I would strongly urge you to avoid using tab characters for the
purposes of indentation altogether. Using tab characters for the
purposes of indentation causes infinite grief (IMO), and I would
advise you to stick:
(setq-default indent-tabs-mode nil)
into your .emacs file.
--
Will
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Emacs BSD/Allman Style with 4 Space Tabs?,
Will Parsons <=