From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.help Subject: Re: Cool and Useful LISP for the .emacs file Date: Fri, 07 Nov 2003 18:37:28 +0000 Organization: funfunfun Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068231752 30950 80.91.224.253 (7 Nov 2003 19:02:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2003 19:02:32 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 07 20:02:30 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AIBsM-0005zS-00 for ; Fri, 07 Nov 2003 20:02:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AICZG-0000SC-20 for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Nov 2003 14:46:50 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!vegetable.demon.co.UK!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: vegetable.demon.co.uk (80.177.16.3) Original-X-Trace: news.uni-berlin.de 1068230250 48715495 80.177.16.3 (16 [97657]) X-No-Yes: No Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 Cancel-Lock: sha1:Uhc7L9MGS7NsnkrB1q0i/CA8W0Y= Original-Xref: shelby.stanford.edu gnu.emacs.help:117981 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13917 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13917 Reiner Steib wrote: [...] > | (setq require-final-newline 'query) > Hm, it works, but maybe it should be "ask", see `files.el'. Whilst the defcustom form for REQUIRE-FINAL-NEWLINE has 'ask in it, note the docstring: | Non-nil but not t says ask user whether to add a newline when | there isn't one. nil means don't add newlines. Note also this code from BASIC-SAVE-BUFFER: | (or (eq require-final-newline t) | (and require-final-newline | (y-or-n-p | (format "Buffer %s does not end in newline. Add one? " | (buffer-name))))) i.e. any non-nil but not-t value will have the same effect as any other. Setting it to 'ask, or 'query makes sense for someone looking at the variable binding later. Though (setq require-final-newline 'fnord) should work equally well. [...] -- lawrence mitchell