mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix #56: Error when launching Gnus.
This commit is contained in:
parent
1497e12b08
commit
da9fa3ced2
1 changed files with 7 additions and 7 deletions
|
@ -542,7 +542,7 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
|
||||||
|
|
||||||
(defun doom-modeline-buffer-file-name ()
|
(defun doom-modeline-buffer-file-name ()
|
||||||
"Propertized variable `buffer-file-name' based on `doom-modeline-buffer-file-name-style'."
|
"Propertized variable `buffer-file-name' based on `doom-modeline-buffer-file-name-style'."
|
||||||
(let ((buffer-file-name (file-local-name (or (buffer-file-name (buffer-base-buffer)) "")))
|
(let* ((buffer-file-name (file-local-name (or (buffer-file-name (buffer-base-buffer)) "")))
|
||||||
(buffer-file-truename (file-local-name (or buffer-file-truename (file-truename buffer-file-name) ""))))
|
(buffer-file-truename (file-local-name (or buffer-file-truename (file-truename buffer-file-name) ""))))
|
||||||
(propertize
|
(propertize
|
||||||
(pcase doom-modeline-buffer-file-name-style
|
(pcase doom-modeline-buffer-file-name-style
|
||||||
|
@ -642,15 +642,15 @@ Example:
|
||||||
(concat
|
(concat
|
||||||
;; project root parent
|
;; project root parent
|
||||||
(unless hide-project-root-parent
|
(unless hide-project-root-parent
|
||||||
(propertize
|
|
||||||
(when-let (root-path-parent
|
(when-let (root-path-parent
|
||||||
(file-name-directory (directory-file-name project-root)))
|
(file-name-directory (directory-file-name project-root)))
|
||||||
|
(propertize
|
||||||
(if (and truncate-project-root-parent
|
(if (and truncate-project-root-parent
|
||||||
(not (string-empty-p root-path-parent))
|
(not (string-empty-p root-path-parent))
|
||||||
(not (string-equal root-path-parent "/")))
|
(not (string-equal root-path-parent "/")))
|
||||||
(shrink-path--dirs-internal root-path-parent t)
|
(shrink-path--dirs-internal root-path-parent t)
|
||||||
(abbreviate-file-name root-path-parent)))
|
(abbreviate-file-name root-path-parent))
|
||||||
'face sp-props))
|
'face sp-props)))
|
||||||
;; project
|
;; project
|
||||||
(propertize
|
(propertize
|
||||||
(concat (file-name-nondirectory (directory-file-name project-root)) "/")
|
(concat (file-name-nondirectory (directory-file-name project-root)) "/")
|
||||||
|
|
Loading…
Reference in a new issue