From: Will Parsons <oudeis@nodomain.invalid>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs BSD/Allman Style with 4 Space Tabs?
Date: 2 Nov 2012 00:21:29 GMT [thread overview]
Message-ID: <afgi09F8p8gU1@mid.individual.net> (raw)
In-Reply-To: f882ede1-dc49-4704-a260-df55b1131837@googlegroups.com
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 parent reply other threads:[~2012-11-02 0:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 2:15 Emacs BSD/Allman Style with 4 Space Tabs? hany
2012-11-02 0:21 ` Will Parsons [this message]
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=afgi09F8p8gU1@mid.individual.net \
--to=oudeis@nodomain.invalid \
--cc=help-gnu-emacs@gnu.org \
--cc=wbparsons@cshore.com \
/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.