Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2007 21:32:56 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        soc@hbar.us
Cc:        des@des.no, dmw@unete.cl, freebsd-hackers@freebsd.org
Subject:   Re: Setting up development environment
Message-ID:  <20070715.213256.-1947358182.imp@bsdimp.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <47a4f3080707151215t42ed03adp3eab92984e8b670a@mail.gmail.co=
m>
            "Brian Chu" <soc@hbar.us> 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 <des@des.no> wrote:
: > "Daniel Molina Wegener" <dmw@unete.cl> 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"
: =




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070715.213256.-1947358182.imp>