From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: cc-mode adds newlines Date: Fri, 19 Nov 2004 20:27:48 +0000 (GMT) Message-ID: References: <7joiybt7.fsf@blue.sea.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1100903936 27936 80.91.229.6 (19 Nov 2004 22:38:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Nov 2004 22:38:56 +0000 (UTC) Cc: Andries.Brouwer@cwi.nl, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 19 23:38:50 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 1CVHP0-0006nU-00 for ; Fri, 19 Nov 2004 23:38:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVHXv-0000Cx-6f for ged-emacs-devel@m.gmane.org; Fri, 19 Nov 2004 17:48:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CVHXe-00009t-9J for emacs-devel@gnu.org; Fri, 19 Nov 2004 17:47:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CVHXa-00008E-G9 for emacs-devel@gnu.org; Fri, 19 Nov 2004 17:47:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVHXa-00008B-Bl for emacs-devel@gnu.org; Fri, 19 Nov 2004 17:47:42 -0500 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CVHO3-0001Wh-HS for emacs-devel@gnu.org; Fri, 19 Nov 2004 17:37:52 -0500 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id UAA00481; Fri, 19 Nov 2004 20:27:50 GMT X-Sender: root@acm.acm Original-To: Jari Aalto In-Reply-To: <7joiybt7.fsf@blue.sea.net> 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:30108 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30108 On Fri, 19 Nov 2004, Jari Aalto wrote: >This is your copy. Article has been posted to the newsgroup(s). > writes: >| Working with emacs 21.3. >| Struggled for a while to get emacs to save a file without final newline. >| ...The point is: emacs must not start changing my files without >| being asked. >I agree. The problem is not just in CC mode, but also in other modes as >well. Could someone from the dev team address these below. In CC mode, there is the (customisable) variable c-require-final-newline, an association list, which you can set to either t, nil, or "don't touch!" for each language independently. The thinking is that some languages' syntaxes absolutely require a final newline (I haven't myself checked if this is true), and that only in those languages (C, C++, Objective-C) is c-require-final-newline set to t. >Jari -- Alan Mackenzie (Munich, Germany)