From owner-freebsd-standards Sat Dec 29 21:17:22 2001 Delivered-To: freebsd-standards@freebsd.org Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id BD73837B41D for ; Sat, 29 Dec 2001 21:17:17 -0800 (PST) Received: from madman.nectar.cc (madman.nectar.cc [10.0.1.111]) by gw.nectar.cc (Postfix) with ESMTP id 1E4EF2E; Sat, 29 Dec 2001 23:17:17 -0600 (CST) Received: (from nectar@localhost) by madman.nectar.cc (8.11.6/8.11.6) id fBU5HGZ80323; Sat, 29 Dec 2001 23:17:16 -0600 (CST) (envelope-from nectar) Date: Sat, 29 Dec 2001 23:17:16 -0600 From: "Jacques A. Vidrine" To: Joe Halpin Cc: standards@FreeBSD.ORG Subject: Re: Emacs and style(9) Message-ID: <20011230051716.GA80312@madman.nectar.cc> References: <20011228031537.B99161@espresso.q9media.com> <3C2CA64C.663F8943@attbi.com> <200112281746.fBSHk6n58428@khavrinen.lcs.mit.edu> <20011228.120317.105126127.imp@village.org> <20011229175813.GA42892@madman.nectar.cc> <3C2E1481.75D70CE1@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C2E1481.75D70CE1@attbi.com> User-Agent: Mutt/1.3.23.1i X-Url: http://www.nectar.cc/ Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 29, 2001 at 01:07:45PM -0600, Joe Halpin wrote: > "Jacques A. Vidrine" wrote: > > > > Here's how I do it in xemacs. Perhaps someone will take all of these > > posts and come up with the One Perfect Way. > > > > (defconst knf-c-style > > '((c-basic-offset . 8) > > (c-indent-level . 8) > > (c-continued-statement-offset . 8) > > Shouldn't things like this be 4 rather than 8? Well, c-continued-statement-offset probably should be 4. This was left over from days past, and isn't used by cc-mode actually (thus my comment about dumping them). Shortly after my post I got rid of that crud and so I'm left with just: (defconst knf-c-style '((c-basic-offset . 8) (c-offsets-alist . ((knr-argdecl-intro . +) (knr-argdecl . 0) (block-open . -) (label . -) (statement-cont . 4) (arglist-cont . 4) (arglist-cont-nonempty 4)))) "BSD KNF") Notice that the 4 space indent is used for continuation. > The style manpage says > "Indentation is an 8 character tab. Second level indents are four > spaces.". > > That's what I've been having the most trouble with. If I define > c-basic-offset to be 8, and then define other offsets to be 4, it > doesn't work for me. I don't really speak emacs lisp very well though, > so maybe my accent is screwing things up. > > [...] > > > If I recall correctly, the stuff besides `c-offsets-alist' and > > `c-basic-offset' is just for old c-mode compatibility and is probably > > not needed. > > Maybe that's my problem. Any way to do what the style manpage wants? Have you tried what I posted previously? Works for me. Cheers, -- Jacques A. Vidrine http://www.nectar.cc/ NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message