Change Emacs Default Coding System

后端 未结 7 1502
-上瘾入骨i
-上瘾入骨i 2021-02-01 17:44

My problem stems from Emacs inserting the coding system headers into source files containing non-ascii characters:

# -*- coding: utf-8 -*-

My c

7条回答
  •  暖寄归人
    2021-02-01 18:31

    You can also use directory local variables to set up the variables: http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html

    If you put a file with a special name .dir-locals.el in a directory, Emacs will read it when it visits any file in that directory or any of its subdirectories, and apply the settings it specifies to the file's buffer. Emacs searches for .dir-locals.el starting in the directory of the visited file, and moving up the directory tree. (To avoid slowdown, this search is skipped for remote files.)

提交回复
热议问题