[英]Emacs automatically adding a newline even after changing .emacs
我目前在Mac上,并且我试图将Emacs设置为默认情况下不在文件末尾添加换行符,但我搜索的几乎所有内容都表示只需添加(setq require-final-newline nil)。主目录中的emacs文件...这不起作用。 我接下来要改变什么?
这就是.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.
)
你有没有尝试过:
(setq mode-require-final-newline nil)
该文件的主要模式可能是使用此变量的值而不是...
如何找出使用此模式而不是您尝试过的变量并不是很明显,但可能是该模式的作者更了解...
因此,您可能希望更改该文件的主要模式,这可以通过回答此SQ问题来完成: 如何告诉emacs在C ++模式下打开.h文件? (显然可以根据您的需要定制答案)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.