Minor updates.

This commit is contained in:
Derek Taylor
2020-08-11 17:27:59 -05:00
parent c00618a23a
commit 367af05623
154 changed files with 2484 additions and 1801 deletions

View File

@@ -356,7 +356,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
'((:eval
(propertize
(let ((buffer-file-name (buffer-file-name (buffer-base-buffer))))
(or (when buffer-file-name
(or (when (and (not (file-remote-p buffer-file-name)) buffer-file-name)
(if-let (project (doom-project-root buffer-file-name))
(let ((filename (or buffer-file-truename (file-truename buffer-file-name))))
(file-relative-name filename (concat project "..")))))
@@ -458,14 +458,17 @@ lines are selected, or the NxM dimensions of a block selection.")
;;; `+modeline-encoding'
(def-modeline-var! +modeline-encoding
'(:eval
(concat (coding-system-eol-type-mnemonic buffer-file-coding-system)
" "
(let ((sys (coding-system-plist buffer-file-coding-system)))
`(:eval
(let ((sys (coding-system-plist buffer-file-coding-system))
(eol (coding-system-eol-type-mnemonic buffer-file-coding-system)))
(concat (unless (equal eol ,(if IS-WINDOWS "CRLF" "LF"))
(concat " " eol " "))
(if (memq (plist-get sys :category)
'(coding-category-undecided coding-category-utf-8))
"UTF-8"
(upcase (symbol-name (plist-get sys :name))))))))
(unless (string-match-p "utf-8" (symbol-name buffer-file-coding-system))
"UTF-8 ")
(concat (upcase (symbol-name (plist-get sys :name)))
" "))))))
;; Clearer mnemonic labels for EOL styles
(setq eol-mnemonic-dos "CRLF"
@@ -491,7 +494,6 @@ lines are selected, or the NxM dimensions of a block selection.")
vc-mode " "))
" "
+modeline-encoding
" "
(+modeline-checker ("" +modeline-checker " "))))
(def-modeline! 'project