[英]Emacs - require-final-newline local value overrides global value
我想將每個緩沖區的require-final-newline
為nil
。 在我的配置文件中,我有:
(setq require-final-newline nil)
(setq-default require-final-newline nil)
它似乎正確設置全局值。 但是在我打開的每個緩沖區中,本地值仍為t
。 使用describe-variable
,我得到:
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
位於/usr/local/Cellar/emacs/24.5/share/emacs/24.5/lisp/
,所以我想我不應該修改它。 如何將此本地值設置為nil
?
首先,有些模式強制設置require-final-newline
,因為這些類型的文件需要最終的換行符。 但是,我不認為js-mode
是其中之一。
據推測,你有一些自定義配置,這可能是通過js-mode-hook
或prog-mode-hook
。
使用emacs -Q
確認這不是默認行為,然后你可以設置跟蹤罪魁禍首(我只會在你的elisp文件中使用Mx rgrep
for require-final-newline
)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.