doom_bankruptcy #14
12
emacs/+modeline.el
Normal file
12
emacs/+modeline.el
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
;;; +modeline.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Only let us know when the encoding is NOT LF UTF-8.
|
||||||
|
(defun doom-modeline-conditional-buffer-encoding ()
|
||||||
|
"We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case"
|
||||||
|
(setq-local doom-modeline-buffer-encoding
|
||||||
|
(unless (and (memq (plist-get (coding-system-plist buffer-file-coding-system) :category)
|
||||||
|
'(coding-category-undecided coding-category-utf-8))
|
||||||
|
(not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2))))
|
||||||
|
t)))
|
||||||
|
|
||||||
|
(add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding)
|
|
@ -22,3 +22,4 @@
|
||||||
(load! "+mail")
|
(load! "+mail")
|
||||||
(load! "+org")
|
(load! "+org")
|
||||||
(load! "+company")
|
(load! "+company")
|
||||||
|
(load! "+modeline")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user