From 7844115561a1583342359c488f4656210fd88fd0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 3 Jan 2019 12:36:44 -0500 Subject: [PATCH] ui/modeline: don't show encoding if UTF-8 It's only important if the encoding is something we don't expect. --- modules/ui/modeline/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index e25aa9fd0..a7212ee61 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -503,8 +503,8 @@ Meant for `+modeline-buffer-path-function'." (cond ((eq category 'coding-category-undecided) "") ((or (eq category 'coding-category-utf-8) - (eq (plist-get sys :name) 'prefer-utf-8)) - "UTF-8 ") + (string-match-p "utf-8" (symbol-name (plist-get sys :name)))) + "") ((concat (upcase (symbol-name (plist-get sys :name))) " "))) 'help-echo (plist-get (coding-system-plist buffer-file-coding-system) :docstring)))))