Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2008 19:29:28 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Rui Paulo <rpaulo@fnop.net>
Cc:        cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, src-committers@FreeBSD.org, "Sean C. Farley" <scf@FreeBSD.org>, David O'Brien <obrien@FreeBSD.org>
Subject:   Re: cvs commit: src/tools/tools/editing freebsd.vim
Message-ID:  <867ifoaulz.fsf@ds4.des.no>
In-Reply-To: <20080319133906.GA3872@fnop.net> (Rui Paulo's message of "Wed\, 19 Mar 2008 13\:39\:06 %2B0000")
References:  <200803131852.m2DIqkw3095857@repoman.freebsd.org> <alpine.BSF.1.00.0803131754020.2408@thor.farley.org> <20080314003205.GA94057@dragon.NUXI.org> <20080319133906.GA3872@fnop.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Rui Paulo <rpaulo@fnop.net> writes:
> I think this should be mentioned in the developer's handbook because,
> IIRC, the sample .emacs file in there is bogus and doesn't really
> respect style(9).

(defun des-knf ()
  (interactive)
  (c-set-style "bsd")

  ;; Basic indent is 8 spaces
  (setq c-basic-offset 8)
  (setq tab-width 8)

  ;; Continuation lines are indented 4 spaces
  (c-set-offset 'arglist-cont 4)
  (c-set-offset 'arglist-cont-nonempty 4)
  (c-set-offset 'statement-cont 4)
  (c-set-offset 'cpp-macro-cont 8)

  ;; Labels are flush to the left
  (c-set-offset 'label [0])

  ;; Fill column
  (setq fill-column 74))

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?867ifoaulz.fsf>