Bug 119141 - emacs variable require-final-newline set improperly in default.el
emacs variable require-final-newline set improperly in default.el
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: emacs (Show other bugs)
3.0
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jens Petersen
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-25 10:20 EST by David Olsson
Modified: 2015-01-07 19:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-29 03:50:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Olsson 2004-03-25 10:20:34 EST
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 11:14:41 EDT
Thanks, will get fixed for now in Fedora Core devel: in emacs-21.3-12.
Comment 2 Ralph Loader 2005-05-28 20:57:25 EDT
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 04:47:45 EDT
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.