From 113dcd74cf4f7e064990cda907b7e655bed197b0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 May 2021 17:50:30 -0400 Subject: [PATCH] Refactor UTF-8 config After studying set-language-environment, it seems to embody all these lines. And without without it, non-English glyph rendering is very slow (see https://emacs-china.org/t/org-mode/16918). This may have other implications, however, so further testing is needed. --- core/core.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/core.el b/core/core.el index de8ed323c..f335b8af4 100644 --- a/core/core.el +++ b/core/core.el @@ -44,12 +44,9 @@ envvar will enable this at startup.") ;; Contrary to what many Emacs users have in their configs, you don't need more ;; than this to make UTF-8 the default coding system: -(when (fboundp 'set-charset-priority) - (set-charset-priority 'unicode)) ; pretty -(prefer-coding-system 'utf-8) ; pretty -(setq locale-coding-system 'utf-8) ; please -;; The clipboard's on Windows could be in a wider encoding than utf-8 (likely -;; utf-16), so let Emacs/the OS decide what encoding to use there. +(set-language-environment "UTF-8") +;; ...but the clipboard's on Windows could be in another encoding (likely +;; utf-16), so let Emacs/the OS decide what to use there. (unless IS-WINDOWS (setq selection-coding-system 'utf-8)) ; with sugar on top