From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andries Brouwer Newsgroups: gmane.emacs.devel Subject: Re: cc-mode adds newlines Date: Mon, 22 Nov 2004 16:54:33 +0100 Message-ID: <20041122155433.GB9295@apps.cwi.nl> References: <20041121122629.GE20436@apps.cwi.nl> <20041121142946.GO20436@apps.cwi.nl> <1101063835.549340.23229.nullmailer@Update.UU.SE> <20041121211900.GA25181@apps.cwi.nl> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101138919 7820 80.91.229.6 (22 Nov 2004 15:55:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Nov 2004 15:55:19 +0000 (UTC) Cc: Andries Brouwer , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 22 16:55:08 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CWGWx-0000MJ-00 for ; Mon, 22 Nov 2004 16:55:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWGg0-00062S-Gi for ged-emacs-devel@m.gmane.org; Mon, 22 Nov 2004 11:04:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWGfo-00061g-9v for emacs-devel@gnu.org; Mon, 22 Nov 2004 11:04:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWGfl-00060H-Jx for emacs-devel@gnu.org; Mon, 22 Nov 2004 11:04:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWGfk-00060E-2K for emacs-devel@gnu.org; Mon, 22 Nov 2004 11:04:13 -0500 Original-Received: from [192.16.191.8] (helo=hera.cwi.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWGWT-0000dN-ME for emacs-devel@gnu.org; Mon, 22 Nov 2004 10:54:38 -0500 Original-Received: from apps.cwi.nl (apps.cwi.nl [192.16.191.34]) by hera.cwi.nl with ESMTP id iAMFsaXK001814 for ; Mon, 22 Nov 2004 16:54:36 +0100 (MET) Original-Received: (from aeb@localhost) by apps.cwi.nl (8.11.7p1+Sun/8.12.2) id iAMFsYb25184; Mon, 22 Nov 2004 16:54:34 +0100 (MET) Original-To: Benjamin Riefenstahl Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i 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: main.gmane.org gmane.emacs.devel:30251 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30251 On Mon, Nov 22, 2004 at 12:54:24PM +0100, Benjamin Riefenstahl wrote: > > It is also broken because the CC major mode is documented as "C > > mode: Major mode for editing K&R and ANSI C code", while K&R C is > > explicitly documented as not requiring a final newline. > > You mean the K&R book explicitly said so in it's pre-standard edition? I do not have the K&R book here. I quoted an earlier source that I do have here. Google also finds it various places on the web, e.g. at http://www.freaknet.org/martin/tape/stuff/docs/cman/cman1 "Blanks, tabs, newlines, and comments as described below are ignored except as they serve to separate tokens." [C Reference Manual, Dennis M. Ritchie, May 1, 1977. Reprinted in "The C Programming language" by BWK & DMR, 1978.] > Naturally there is not really a standard definition of pre-standard C. > From what I know about C89, like most restrictions, the requirement of > a final newline was most likely made because one or more compilers > required it that were already implemented and used before the > standard. Yes. Andries