From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: cc-mode adds newlines Date: Sun, 21 Nov 2004 12:06:24 +0100 Message-ID: References: <20041119231343.GA19603@apps.cwi.nl> <20041121020850.GA20436@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 1101035392 17972 80.91.229.6 (21 Nov 2004 11:09:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 Nov 2004 11:09:52 +0000 (UTC) Cc: Alan Mackenzie , Jari Aalto , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 21 12:09:39 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 1CVpb8-0001gf-00 for ; Sun, 21 Nov 2004 12:09:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVpk7-0000Yu-GD for ged-emacs-devel@m.gmane.org; Sun, 21 Nov 2004 06:18:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CVph8-0008Oj-LO for emacs-devel@gnu.org; Sun, 21 Nov 2004 06:15:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CVph5-0008Nk-Be for emacs-devel@gnu.org; Sun, 21 Nov 2004 06:15:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVph4-0008NP-Ho for emacs-devel@gnu.org; Sun, 21 Nov 2004 06:15:46 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CVpY3-0002Q3-SF for emacs-devel@gnu.org; Sun, 21 Nov 2004 06:06:27 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CVpWS-0007m3-M7; Sun, 21 Nov 2004 06:04:49 -0500 Original-To: Andries Brouwer In-Reply-To: <20041121020850.GA20436@apps.cwi.nl> (Andries Brouwer's message of "Sun, 21 Nov 2004 03:08:52 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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:30145 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30145 Andries Brouwer writes: > On Sat, Nov 20, 2004 at 03:14:24PM +0000, Alan Mackenzie wrote: > >> >It is not the goal of an editor to force the user to write syntactically >> >correct programs. >> >> Well, that is debateable. I'd tend to agree with you, whilst pointing >> out that in this case, there was no "force" used [see below]. >> >> An equally valid argument is that of the programmer who hacks through the >> night and sets off a build (which takes several hours to complete), goes >> home for some sleep, then comes back into the office the following >> afternoon. He then finds that the build failed for lack of a final >> newline in one of the files. Then he expostulates "FAQ! Why couldn't >> that stupid editor have put that stupid newline in for me?". > > That is a phantasy argument. > Old compilers just accept the C source without final newline > without any complaint. Some newer pedantic ones print a warning. I would not be surprised if there were compilers that just dropped the last character of a line read in, assuming it to be a linefeed. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum