From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 16 03:34:20 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4B6716A404 for ; Mon, 16 Jul 2007 03:34:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 77CE713C46B for ; Mon, 16 Jul 2007 03:34:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l6G3Wpgt020224; Sun, 15 Jul 2007 21:32:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 15 Jul 2007 21:32:56 -0600 (MDT) Message-Id: <20070715.213256.-1947358182.imp@bsdimp.com> To: soc@hbar.us From: "M. Warner Losh" In-Reply-To: <47a4f3080707151215t42ed03adp3eab92984e8b670a@mail.gmail.com> References: <43801.64.117.137.69.1180473436.squirrel@webmail.ifxnw.cl> <86abvm3k89.fsf@dwp.des.no> <47a4f3080707151215t42ed03adp3eab92984e8b670a@mail.gmail.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 15 Jul 2007 21:32:55 -0600 (MDT) Cc: des@des.no, dmw@unete.cl, freebsd-hackers@freebsd.org Subject: Re: Setting up development environment X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2007 03:34:20 -0000 In message: <47a4f3080707151215t42ed03adp3eab92984e8b670a@mail.gmail.co= m> "Brian Chu" writes: : I have a question about indentation. In the previously supplied : .emacs hook, tabs are represented by 8 spaces. Most of the kernel : code, however, actually uses the tab character. : = : Are both forms acceptable? If not, anyone willing to share their : tab-character-tabs .emacs c hook? Use hard tabs. Don't use spaces, since they cause more problems than the tabs. The big problem is that emacs likes to 'reformat' adjacent lines if you have the settings to use spaces. Warner : Thanks, : Brian : = : On 5/30/07, Dag-Erling Sm=F8rgrav wrote: : > "Daniel Molina Wegener" writes: : > > Is there any official way to setup a development environment f= or : > > FreeBSD. I mean, I want to contribute with FreeBSD development. A= ll : > > I know that there is a Developer's Handbook, but what about setti= ng a : > > development environment for FreeBSD-CURRENT and -STABLE including= : > > from official c-mode-hooks and c++-mode-hooks for emacs to enviro= nment : > > variables for cross-compiling the FreeBSD source. : > : > Emacs setup (for both C and C++): : > : > (defun des-knf () : > (interactive) : > : > ;; Basic indent is 8 spaces : > (make-local-variable 'c-basic-offset) : > (setq c-basic-offset 8) : > : > ;; Continuation lines are indented 4 spaces : > (make-local-variable 'c-offsets-alist) : > (c-set-offset 'arglist-cont 4) : > (c-set-offset 'arglist-cont-nonempty 4) : > (c-set-offset 'statement-cont 4) : > : > ;; Labels are flush to the left : > (c-set-offset 'label [0]) : > : > ;; Fill column : > (make-local-variable 'fill-column) : > (setq fill-column 74)) : > : > (add-hook 'c-mode-common-hook 'des-knf) : > : > As for how to cross-build, read build(7). : > : > DES : > -- : > Dag-Erling Sm=F8rgrav - des@des.no : _______________________________________________ : freebsd-hackers@freebsd.org mailing list : http://lists.freebsd.org/mailman/listinfo/freebsd-hackers : To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd= .org" : =