How to configure GNU Emacs to write UNIX or DOS formatted files by default?

后端 未结 2 1067
名媛妹妹
名媛妹妹 2020-12-25 14:18

I\'ve had these functions in my .emacs.el file for years:

(defun dos2unix ()
  \"Convert a DOS formatted text buffer to UNIX format\"
  (interac         


        
2条回答
  •  一向
    一向 (楼主)
    2020-12-25 14:45

    I've got a bunch of these in my .emacs:

    (setq-default buffer-file-coding-system 'utf-8-unix)
    (setq-default default-buffer-file-coding-system 'utf-8-unix)
    (set-default-coding-systems 'utf-8-unix)
    (prefer-coding-system 'utf-8-unix)
    

    I don't know which is right, I am just superstitious.

提交回复
热议问题