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: Mon, 14 Sep 2009 21:00:12 +0200 Message-ID: <200909142100.13471.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 1252954876 13969 80.91.229.12 (14 Sep 2009 19:01:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Sep 2009 19:01:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 14 21:01:06 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 1MnGnN-0007nN-QL for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2009 21:01:02 +0200 Original-Received: from localhost ([127.0.0.1]:41317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnGnN-0002FM-DY for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2009 15:01:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnGmk-0002CX-K1 for emacs-devel@gnu.org; Mon, 14 Sep 2009 15:00:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnGmg-0002C9-0F for emacs-devel@gnu.org; Mon, 14 Sep 2009 15:00:22 -0400 Original-Received: from [199.232.76.173] (port=59327 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnGmf-0002C6-Lf for emacs-devel@gnu.org; Mon, 14 Sep 2009 15:00:17 -0400 Original-Received: from mail-fx0-f226.google.com ([209.85.220.226]:64420) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MnGmf-0000Oe-6G for emacs-devel@gnu.org; Mon, 14 Sep 2009 15:00:17 -0400 Original-Received: by fxm26 with SMTP id 26so2440827fxm.42 for ; Mon, 14 Sep 2009 12:00:16 -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=uCf9S1UcRdlUCIGuxL5AcjmzkLgndME/XIUHFF+bzJUnFhgZ2RQMd954MJ0LexoWyM 1t3n8WbwOhCpOA8AnEV/Xc8HaCz1BeP3W0GvPXwBXexatmUvSdPXqa6LcGFBUm5RUrUj Ij8TivAMKPY9QA3bweZ/XjMCckuh4OPkzeE6A= 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=SiP/Q3K1xc9vvjAbw/D2LmjLsXYXpmXFpNveJRUebssvxNqsjgMBuDzPhYlIpRPAtR M/0QKFfAQiRmU9eu6r7TaPeiVRErNVuDWVSqpbV4e8uQFEWj1K+LKMhLeUoM8UnDOiJs u445+Ew20NAeZXzV3TmAnpJ3ClNTAdqedk29o= Original-Received: by 10.86.190.37 with SMTP id n37mr5313573fgf.39.1252954816346; Mon, 14 Sep 2009 12:00:16 -0700 (PDT) Original-Received: from peg.localnet (g227160176.adsl.alicedsl.de [92.227.160.176]) by mx.google.com with ESMTPS id e11sm239102fga.26.2009.09.14.12.00.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Sep 2009 12:00: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 monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:115311 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.