Change Emacs Default Coding System

后端 未结 7 1368
-上瘾入骨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:40

    In root of your project create file called .dir-locals.el with content:

    ((nil . ((buffer-file-coding-system . utf-8))))
    

    It will apply this coding to any mode and file. You may see more info here https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html

提交回复
热议问题