我目前正在使用Mac,並且試圖設置Emacs默認情況下不在文件末尾添加換行符,但幾乎所有我搜索的內容都只是說將(setq require-final-newline nil)添加到主目錄中的.emacs文件中...這不起作用。我應該在旁邊看什麼改變?Emacs即使在更改後自動添加換行符.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.
)
更緊迫的問題是:「爲什麼你真的會改變這個理智而有用的默認值,除了在腳下自己射擊?」 – pmr
因爲我正在編輯一個程序的輸入文件,該文件需要將文件結尾字符視爲文件中的最後一個東西,但emacs在該字符後面添加換行符。 – Jayson
展示此問題的文件的主要模式是什麼? –