From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Parsons Newsgroups: gmane.emacs.help Subject: Re: Emacs BSD/Allman Style with 4 Space Tabs? Date: 2 Nov 2012 00:21:29 GMT Message-ID: References: Reply-To: wbparsons@cshore.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1351815915 30059 80.91.229.3 (2 Nov 2012 00:25:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2012 00:25:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 02 01:25:25 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TU54c-0002sc-50 for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Nov 2012 01:25:22 +0100 Original-Received: from localhost ([::1]:42905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU54S-0000QS-Sh for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Nov 2012 20:25:12 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: individual.net GvRGBUkVyWan13YDyfLTRg+QEv2yFOe7PsZh8yWyD6iCQp9jfbBzKMWRBm+PGTTVw8 Cancel-Lock: sha1:wQJ7IWt1zASl065imI91U0brD0c= User-Agent: slrn/0.9.9p1 (FreeBSD) Original-Xref: usenet.stanford.edu gnu.emacs.help:195188 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87517 Archived-At: 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 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