Bug 119141 - emacs variable require-final-newline set improperly in default.el
Summary: emacs variable require-final-newline set improperly in default.el
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: emacs
Version: 3.0
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-03-25 15:20 UTC by David Olsson
Modified: 2015-01-08 00:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-29 07:50:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.