From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Paul D. Smith" Newsgroups: gmane.emacs.bugs Subject: Re: cc-mode adds newlines Date: 22 Nov 2004 00:55:38 -0500 Organization: GNU's Not Unix! Message-ID: References: Reply-To: psmith@gnu.org NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101127150 1225 80.91.229.6 (22 Nov 2004 12:39:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Nov 2004 12:39:10 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 22 13:38:56 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 1CWDT6-0000hl-00 for ; Mon, 22 Nov 2004 13:38:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWDc9-00085v-HM for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Nov 2004 07:48:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWDc3-00084G-7e for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2004 07:48:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWDc2-00083p-9f for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2004 07:48:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWDc2-00083Z-6h for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2004 07:48:10 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CWDSV-00031l-KL for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2004 07:38:19 -0500 Original-Received: from [193.4.58.12] (helo=horus.isnic.is) by mx20.gnu.org with esmtp (Exim 4.34) id 1CWDR5-0008PV-SK for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2004 07:36:52 -0500 Original-Received: from zcars04f.nortelnetworks.com (zcars04f.nortelnetworks.com [47.129.242.57]) by horus.isnic.is (8.12.9p2/8.12.9/isnic) with ESMTP id iAM5tvuC044254 for ; Mon, 22 Nov 2004 05:56:02 GMT (envelope-from news@zcars0v6.ca.nortel.com) Original-Received: from zcars2ky.ca.nortel.com (zcars2ky.ca.nortel.com [47.129.242.221]) by zcars04f.nortelnetworks.com (Switch-2.2.6/Switch-2.2.0) with ESMTP id iAM5tjL16276 for ; Mon, 22 Nov 2004 00:55:45 -0500 (EST) Original-Received: from zcars0v6.ca.nortel.com (zcars0v6.ca.nortel.com [47.248.2.28]) by zcars2ky.ca.nortel.com (Switch-2.2.6/Switch-2.2.0) with ESMTP id iAM5tdk12156 for ; Mon, 22 Nov 2004 00:55:39 -0500 (EST) Original-Received: (from news@localhost) by zcars0v6.ca.nortel.com (8.11.7p1+Sun/8.9.3) id iAM5tdt04381 for gnu-emacs-bug@moderators.uu.net; Mon, 22 Nov 2004 00:55:39 -0500 (EST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 40 Original-NNTP-Posting-Host: lemming.engeast.baynetworks.com Original-X-Trace: zcars0v6.ca.nortel.com 1101102939 4371 47.17.140.90 (22 Nov 2004 05:55:39 GMT) Original-X-Complaints-To: hawkinsj@nortelnetworks.com Original-NNTP-Posting-Date: Mon, 22 Nov 2004 05:55:39 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9780 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9780 %% Richard Stallman writes: rs> In the GNU Project we don't impose restrictions just because rs> someone else decided to. That's fine for GCC and other GNU tools, but Emacs is not always used to edit files which are only used with other GNU programs. The C standard requires a newline. It's probably not the only one. Regardless of standards, there are tools out there which do not behave properly if a file does not end in a newline. Sometimes they even misbehave _silently_. And finally, I have a very hard time imagining a situation where it's important to _NOT_ have a final newline in a text file, especially a C source file (if your file is not a C file then you shouldn't be editing it in C mode!) I'm quite confident that the large majority of users _WANT_ a newline at the end of their text files; I really doubt that this can be creating real problems for anyone other than a very tiny minority. If the consensus is that modes shouldn't be setting this variable due to philosophical thoughts about Emacs modifying files behind the user's back that's OK, but if you change this behavior please replace it with a simple, one-step operation to reinstate the current operation for the modes where it makes sense (e.g. at least those that currently have it set to t). I don't think all those people should have to go create a new mode hook for every mode that used to have this value set but no longer does. Maybe a new value for require-final-newline of 'text or something where Emacs would just add the newline for text files (modes might have to define this property somehow) without asking, and ask for other files. Anyway, that's my $0.02. -- ------------------------------------------------------------------------------- Paul D. Smith Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist