From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: cc-mode adds newlines Date: Fri, 31 Dec 2004 10:26:03 -0500 Message-ID: References: <200411281656.iASGuMP15956@apps.cwi.nl> <5bact1lwp5.fsf@lister.roxen.com> <20041128202015.GA821@apps.cwi.nl> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1104507198 28320 80.91.229.6 (31 Dec 2004 15:33:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 31 Dec 2004 15:33:18 +0000 (UTC) Cc: bug-cc-mode@gnu.org, acm@muc.de, Andries.Brouwer@cwi.nl, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 31 16:33:10 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 1CkOm6-0008Oy-00 for ; Fri, 31 Dec 2004 16:33:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CkOx6-00027R-PH for ged-emacs-devel@m.gmane.org; Fri, 31 Dec 2004 10:44:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CkOwb-00023H-U9 for emacs-devel@gnu.org; Fri, 31 Dec 2004 10:44:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CkOwX-00020R-1C for emacs-devel@gnu.org; Fri, 31 Dec 2004 10:43:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CkOwW-000206-QZ for emacs-devel@gnu.org; Fri, 31 Dec 2004 10:43:56 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CkOlC-0007WL-4B for emacs-devel@gnu.org; Fri, 31 Dec 2004 10:32:14 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CkOfD-0001qv-0H; Fri, 31 Dec 2004 10:26:03 -0500 Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Tue, 30 Nov 2004 02:01:50 -0500) 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:31643 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31643 The current situation, where (after 0 changes) save-buffer returns "(No changes need to be saved)" and write-file nevertheless writes a different file, is unfortunate and messy. I looked at changing this, but couldn't find a good way to do it. I tried to provide values of require-final-newline that only add a newline if the file is really changed. But it is hard to distinguish use of write-file from "really changed" because write-file operates by marking the buffer as modified (that is how it forces a save). Do you have any ideas? It would not be hard to make a further change here.