From owner-freebsd-standards Fri Dec 28 11: 3:28 2001 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 5F65137B425 for ; Fri, 28 Dec 2001 11:03:25 -0800 (PST) Received: from localhost (imp@dhcp30.timing.com [206.168.13.252]) by rover.village.org (8.11.3/8.11.3) with ESMTP id fBSJ3Il21754; Fri, 28 Dec 2001 12:03:18 -0700 (MST) (envelope-from imp@village.org) Date: Fri, 28 Dec 2001 12:03:17 -0700 (MST) Message-Id: <20011228.120317.105126127.imp@village.org> To: wollman@khavrinen.lcs.mit.edu Cc: joe.halpin@attbi.com, standards@FreeBSD.ORG Subject: Re: Emacs and style(9) From: "M. Warner Losh" In-Reply-To: <200112281746.fBSHk6n58428@khavrinen.lcs.mit.edu> References: <20011228031537.B99161@espresso.q9media.com> <3C2CA64C.663F8943@attbi.com> <200112281746.fBSHk6n58428@khavrinen.lcs.mit.edu> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 : I have used the following (in Emacs 19) for ever and ever. It does : not quite meet with the official standard, but to the extent that I : care it's not so hard to touch things up manually after the fact. : : (defun my-c-mode-common-hook () : (c-set-style "bsd") : (setq c-basic-offset 8)) I thought there was a style thing in /usr/share/examples, but can't find it now... Warner P.S. Here's what I have, but it isn't exactly perfect... (defun bsd-c-mode-user-setup () "Hacks" (interactive) (c-set-style "bsd") (setq c-basic-offset 8 c-conditional-key c-C++-conditional-key indent-tabs-mode t c-tab-always-indent nil) (setq c-cleanup-list (append c-cleanup-list (list 'brace-else-brace))) (c-set-offset 'arglist-close 0) (c-set-offset 'arglist-cont-nonempty 4) (c-set-offset 'inline-open 0) (c-set-offset 'case-label 0) (c-set-offset 'statement-cont 4) (c-toggle-auto-state 1)) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message