ui/modeline: show UTF-8 for prefer-utf-8 encoding
This commit is contained in:
parent
230135cf06
commit
786ab9e7b5
1 changed files with 3 additions and 1 deletions
|
@ -494,7 +494,9 @@ Meant for `+modeline-buffer-path-function'."
|
|||
(let* ((sys (coding-system-plist buffer-file-coding-system))
|
||||
(category (plist-get sys :category)))
|
||||
(cond ((eq category 'coding-category-undecided) "")
|
||||
((eq category 'coding-category-utf-8) "UTF-8 ")
|
||||
((or (eq category 'coding-category-utf-8)
|
||||
(eq (plist-get sys :name) 'prefer-utf-8))
|
||||
"UTF-8 ")
|
||||
((concat (upcase (symbol-name (plist-get sys :name))) " "))))))
|
||||
|
||||
(def-modeline-segment! +modeline-major-mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue