From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.bugs Subject: cc-mode adds newlines Date: Thu, 18 Nov 2004 23:45:32 +0100 (MET) Message-ID: <200411182245.iAIMjWZ15062@apps.cwi.nl> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100817957 1911 80.91.229.6 (18 Nov 2004 22:45:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 Nov 2004 22:45:57 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 18 23:45:49 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 1CUv2D-0006Q2-00 for ; Thu, 18 Nov 2004 23:45:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUvB5-00042l-12 for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Nov 2004 17:54:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CUvB2-00042g-RF for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 17:54:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CUvB2-00042U-D5 for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 17:54:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUvB2-00042R-AK for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 17:54:56 -0500 Original-Received: from [192.16.191.8] (helo=hera.cwi.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CUv1y-00005Z-7K for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 17:45:34 -0500 Original-Received: from apps.cwi.nl (apps.cwi.nl [192.16.191.34]) by hera.cwi.nl with ESMTP id iAIMjWcI000017 for ; Thu, 18 Nov 2004 23:45:33 +0100 (MET) Original-Received: (from aeb@localhost) by apps.cwi.nl (8.11.7p1+Sun/8.12.2) id iAIMjWZ15062; Thu, 18 Nov 2004 23:45:32 +0100 (MET) Original-To: bug-gnu-emacs@gnu.org 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:9739 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9739 Working with emacs 21.3. Struggled for a while to get emacs to save a file without final newline. It is very bad that an editor decides to change my files behind my back. If it asks "shall I add?", that is OK. If there is a user variable that one can set so that it will never ask, that is OK as well. But the default must always be not to damage the user's files by doing "helpful" things. OK. There is a variable require-final-newline. But setting it did not make any difference. The setting was overridden by cc-mode.el. So, it looks like this aspect of emacs 21.3 is broken. Asking Google I find a lot of discussion about the topic. Apparently I am not the only one who hates it if the editor changes files without having been asked to. There is talk about c-require-final-newline as a variable, or perhaps as an alist. I see discussion about what languages have formal standards that require source code lines to end with newline. But that is all completely beside the point. The point is: emacs must not start changing my files without being asked. It doesnt do other things to my source code (fortunately) to make it more "correct". An editor must not "fix" my grammar, or spelling, or layout, or anything at all in the source file without having been asked. Andries