Date: Fri, 20 Jul 2001 09:36:42 -0700 From: Gregory Neil Shapiro <gshapiro@FreeBSD.org> To: Warner Losh <imp@harmony.village.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 style.9 Message-ID: <15192.24090.270882.792561@horsey.gshapiro.net> In-Reply-To: <200107201623.f6KGNno66864@harmony.village.org> References: <20010720113310.C30828@sunbay.com> <200107191803.f6JI3he58920@freefall.freebsd.org> <20010719152744.A37403@sneakerz.org> <200107201623.f6KGNno66864@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
imp> I don't think it is better. If nothing else, emacs will have a harder imp> time doing that because you are indenting 4 spaces most of the time, imp> and 11 in this case. :-( Personally, I prefer indenting to match the '(' in the if as that is the coding style for sendmail. emacs wouldn't have a hard time at all if configured properly. The code below configures c-mode to use sendmail coding style which matches the FreeBSD coding style except for the brace placement. sendmail uses: if (short_test && another) { /* do nothing */ nothing = 1; } else if (checking_a_long_variable && calling_a_long_function_name() && overflows_line) { /* Do something */ something(); } Here are the settings (for those who might want them): (add-hook 'c-mode-hook 'gns-c-mode-hook) (defconst gns-c-style '((c-basic-offset . 8) (c-cleanup-list . (scope-operator empty-defun-braces defun-close-semi)) (c-comment-only-line-offset . 0) (c-echo-syntactic-information-p . t) (c-electric-pound-behavior '(alignleft)) (c-hanging-braces-alist . ((block-open after) (brace-list-open))) (c-hanging-colons-alist . ((member-init-intro before) (inher-intro) (case-label after) (label after) (access-key after))) (c-offsets-alist . ((arglist-close . c-lineup-arglist) ;; (arglist-cont-nonempty . +) (case-label . 2) (knr-argdecl-intro . +) (label . 0) (statement-block-intro . +) (statement-case-intro . 6) (statement-cont . +) (substatement-open . 0) (topmost-intro-cont . 0))))) (setq c-style-variables-are-local-p t) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15192.24090.270882.792561>