Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2001 11:58:13 -0600
From:      "Jacques A. Vidrine" <n@nectar.cc>
To:        "M. Warner Losh" <imp@village.org>
Cc:        wollman@khavrinen.lcs.mit.edu, joe.halpin@attbi.com, standards@FreeBSD.ORG
Subject:   Re: Emacs and style(9)
Message-ID:  <20011229175813.GA42892@madman.nectar.cc>
In-Reply-To: <20011228.120317.105126127.imp@village.org>
References:  <20011228031537.B99161@espresso.q9media.com> <3C2CA64C.663F8943@attbi.com> <200112281746.fBSHk6n58428@khavrinen.lcs.mit.edu> <20011228.120317.105126127.imp@village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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)
    (c-brace-offset . -8)
    (c-argdecl-indent . 8)
    (c-label-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")

(c-add-style "knf" knf-c-style)
(custom-set-variables 
 '(c-default-style "knf"))

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.

Cheers,
-- 
Jacques A. Vidrine <n@nectar.cc>                 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




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