I want to set the require-final-newline for every buffer to nil.
In my config file, I have :
(setq require-final-newline nil)
(setq-default require-final-newline nil)
It appears to set the global value correctly. However in every buffer that I open, the local value is still t. Using describe-variable, I get :
require-final-newline is a variable defined in `files.el'.
Its value is t
Original value was nil
Local in buffer myfile.js; global value is nil
files.el is in /usr/local/Cellar/emacs/24.5/share/emacs/24.5/lisp/, so I guess I should not modify it.
How do I set this local value to nil ?
Firstly, there are modes which forcibly set
require-final-newlineon the basis that those kinds of files require a final newline. I don't believejs-modeis one of them, however.Presumably you have some custom config which is causing this, perhaps set via
js-mode-hookorprog-mode-hook.Confirm with
emacs -Qthat this is not default behaviour, and then you can set about tracking down the culprit (I would justM-x rgrepforrequire-final-newlinein your elisp files).