Red Hat Bugzilla – Bug 102022
Last modified: 2015-01-07 19:06:13 EST
The following settings in defaults.el xemacs-21.4.13-4 don't seem to do anything:
(defvar require-final-newline t)
(defvar next-line-add-newlines nil)
If those are changed to setq or setq-default instead of defvar, they take
effect, but XEmacs becomes antisocial and won't allow users to change them via
I believe the correct way of assigning default values to defcustom variables is
to do setq-default in site-start.el. That way the defaults are as specified
there, and users can override the settigs via the custmization menus (ie. their
Other values in default.el look fine to me and seem to work, because they're not
Will attach a patch to fix this.
Created attachment 93540 [details]
Fix for newline-related defcustom defaults
Actually I noticed that next-line-add-newlines defaults to nil in XEmacs
is that is probably not necessary. I have mixed feelings about the
require-final-newline setting (perhaps 'ask is a friendlier default,
though it becomes a little more verbose).
Agreed that these shouldn't have been in "default.el", thanks for spotting
that. I guess setq-default is ok, but isn't setq sufficient? I just wonder
if setq-default might not confuse users more than setq. "I setq'd
require-final-newline in my init file and the value is still..."?
Well not such a big deal either way.
My personal feeling about require-final-newline is that it is good have on by
default. If people haven't complained, why change it? :) I'm sure that people
would be annoyed by 'ask.
Setting next-line-add-newlines to nil is redundant, you're right. It also
defaults to nil in XEmacs 21.5 and the documentation strongly suggests that it
won't change (see C-h v next-line-add-newlines :)
Regarding the setq vs setq-default issue, I believe you and I have the same goal
wrt. site-start.el: to set a good system default and to allow users to override
it in via customize in custom.el or manually in init.el. I don't see any
difference whether setq or setq-default is used in site-start.el, I can still
customize the setting as a user just as I like.
But IMO setq-default is exactly what we want to do: to set the default value
(setq-default) instead of unconditionally setting it to a specified value at
some point of time (setq). I'm not 100% confident that I understand the
semantics of setq-default though, but it seems The Right Thing To Do to me.
While I'm at it, new Sumo packages are out... and they contain at least one
annoying bug in rpm-spec-mode for us Epoch: 0 enthusiasts, fix at
FWIW, I tried out setting require-final-newline to 'ask, but it drives me crazy
in about 2 minute. I suspect there are lots of users around that feel the same,
especially beginners. Please consider setq-default'ing it to t as it has been a
long time default...
FYI: if you're planning an update soon, 21.4.14 is out...
require-final-newline will default to t in 21.4.14-1.