我目前使用的是Mac电脑,尝试设置Emacs默认不在文件结尾添加换行符。但是几乎所有搜索结果都建议在家目录下的.emacs文件中添加(setq require-final-newline nil)代码...但是这并没有起作用。接下来我应该看哪些方面进行修改?
这是当前.emacs文件的内容:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(gud-gdb-command-name "gdb --annotate=1")
'(large-file-warning-threshold nil)
'(require-final-newline nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
nil
。 - legends2k