From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jyqvklioo@googlemail.com Newsgroups: gmane.emacs.devel Subject: Source Code Formatting Standard Update Date: Tue, 15 Sep 2009 09:31:08 +0200 Message-ID: <200909150931.09803.jyqvklioo@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1252999900 31054 80.91.229.12 (15 Sep 2009 07:31:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Sep 2009 07:31:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 15 09:31:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MnSVg-0007VE-Ma for ged-emacs-devel@m.gmane.org; Tue, 15 Sep 2009 09:31:32 +0200 Original-Received: from localhost ([127.0.0.1]:33193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnSVf-0005Yw-Iu for ged-emacs-devel@m.gmane.org; Tue, 15 Sep 2009 03:31:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnSVZ-0005XX-N7 for emacs-devel@gnu.org; Tue, 15 Sep 2009 03:31:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnSVU-0005Wg-9h for emacs-devel@gnu.org; Tue, 15 Sep 2009 03:31:24 -0400 Original-Received: from [199.232.76.173] (port=40880 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnSVU-0005Wd-33 for emacs-devel@gnu.org; Tue, 15 Sep 2009 03:31:20 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:17504) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MnSVT-0005ld-Hc for emacs-devel@gnu.org; Tue, 15 Sep 2009 03:31:19 -0400 Original-Received: from mail-fx0-f226.google.com ([209.85.220.226]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MnSVS-0000Gz-MA for emacs-devel@gnu.org; Tue, 15 Sep 2009 03:31:18 -0400 Original-Received: by fxm26 with SMTP id 26so2734261fxm.42 for ; Tue, 15 Sep 2009 00:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:mime-version:content-disposition:message-id:content-type :content-transfer-encoding; bh=HgP3ri/851V2CjN+bINjbt8P5ezs8nN20I2UyTu9h80=; b=GbFv/7SpW7peFe3/+sbUMQWOGKXojBKIlLE/dvduzkawqJ6+7FZpiwXkOwzpf97K01 9XswptAnf91dupUcBKYpgPSEw/quKfk+rFPgHt/umBQ7H+Jse8W5t4BVFyEl9S9urasW HMxBgYqg8g4s5fV2JhDKMDx0IwcTIGSXe13Ls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-disposition :message-id:content-type:content-transfer-encoding; b=ifcfIORJnB7SwGBEBznDNe1211MQ9diLDO8Zx4BRYj6jbNUfTOQTQkhuC4FkmmJisC 7RHHphy5z/dMkBDgg8ZMHcCsZtrxLlC2JAekwx5y8DR5n62AZh1ox0xeM7sW9XU5UDEM g/zY8sDrGWKVtV7IOl+vx3Gx9U3XdInTUeJvo= Original-Received: by 10.86.249.30 with SMTP id w30mr2450534fgh.35.1252999876756; Tue, 15 Sep 2009 00:31:16 -0700 (PDT) Original-Received: from peg.localnet (g227185042.adsl.alicedsl.de [92.227.185.42]) by mx.google.com with ESMTPS id 4sm1348606fgg.4.2009.09.15.00.31.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Sep 2009 00:31:15 -0700 (PDT) User-Agent: KMail/1.11.4 (Linux/2.6.30-1-686; KDE/4.2.4; i686; ; ) Content-Disposition: inline X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115335 Archived-At: I quote: " http://www.gnu.org/prep/standards/html_node/Formatting.html 5.1 Formatting Your Source Code It is important to put the open-brace that starts the body of a C function in column one, so that they will start a defun. " Does emacs still have this limitation? If not, the standard can be updated to make the curly brace placement more consistent. The next issue is not emacs specific, but here may be as good a place to address it as there is, as far as I can see. " In Standard C, if the arguments don't fit nicely on one line, split it like this: int lots_of_args (int an_integer, long a_long, short a_short, double a_double, float a_float) " This practice produces poor results in languages with highly nested namespaces, like object oriented languages. There you can get code like: namespace.ClassName.NestedClass.nicelyDescriptiveClassName.staticMethod(namespace.ParameterObject a, otherNamespace.secondObject b); If you line break at periods also, the names would span multiple lines.