Bug 119141

Summary: emacs variable require-final-newline set improperly in default.el
Product: Red Hat Enterprise Linux 3 Reporter: David Olsson <dolsson5>
Component: emacsAssignee: Jens Petersen <petersen>
Status: CLOSED CURRENTRELEASE QA Contact: Jay Turner <jturner>
Severity: low Docs Contact:
Priority: medium    
Version: 3.0CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-29 07:50:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Olsson 2004-03-25 15:20:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030922

Description of problem:
In /usr/share/emacs/site-lisp/default.el, the following lisp is
presumably intended to set a configuration variable.

;; always end a file with a newline
(defvar require-final-newline 'query)

It doesn't work.  Replacing it with the following lisp does work.

;; always end a file with a newline
(setq require-final-newline 'query)

I haven't tested the other defvar in default.el but imagine it should
also use setq.

Version-Release number of selected component (if applicable):
emacs-21.3-4

How reproducible:
Always

Steps to Reproduce:
1. Start emacs.
2. ^H^Vrequire-final-newline
3. Note setting.

Or test file saves to see if Emacs prompts for final newline.

Comment 1 Jens Petersen 2004-04-15 15:14:41 UTC
Thanks, will get fixed for now in Fedora Core devel: in emacs-21.3-12.

Comment 2 Ralph Loader 2005-05-29 00:57:25 UTC
Any change this could be removed from default.el, or at least wrap in some
if-not-already-set logic?

Having it in default.el overrides user preferences set via customize.  Googling
for require-final-newline suggests I'm not the only one who wants it gone.

Appart from being really intrusive (I get asked just about every time I save a
file), the value you've set potentially means the users will lose data - save a
file, don't realise that the save hasn't been done, kill the X session, file lost.

Comment 3 Jens Petersen 2005-05-30 08:47:45 UTC
Ralph, ok sounds reasonable - I'll move the definition to a comment
in the default .emacs file in the next Fedora Core devel build.