1 Star 0 Fork 2

zhengchen/emacs

forked from latpaw/emacs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
init-locales.el 825 Bytes
一键复制 编辑 原始数据 按行查看 历史
(defun locale-is-utf8-p ()
"Return t iff the \"locale\" command or environment variables prefer UTF-8."
(flet ((is-utf8 (v) (and v (string-match "UTF-8" v))))
(or (is-utf8 (and (executable-find "locale") (shell-command-to-string "locale")))
(is-utf8 (getenv "LC_ALL"))
(is-utf8 (getenv "LC_CTYPE"))
(is-utf8 (getenv "LANG")))))
(when (or window-system (locale-is-utf8-p))
(setq utf-translate-cjk-mode nil) ; disable CJK coding/encoding (Chinese/Japanese/Korean characters)
(set-language-environment 'utf-8)
(when *is-carbon-emacs*
(set-keyboard-coding-system 'utf-8-mac))
(setq locale-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8))
(provide 'init-locales)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cowboy13/emacs.git
git@gitee.com:cowboy13/emacs.git
cowboy13
emacs
emacs
master

搜索帮助