mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Fix calling `projectile-project-root'.
Depending on configuration, `projectile-project-root' raises an error if there is no project available. This behaviour almost renders Emacs unusable outside of projects as `doom-modeline-project-root' gets called upon every redisplay of the modeline, which then causes the error. This fix just ignores errors thrown by `projectile-project-root' and returns `nil' instead, which is what we expect anyway.
This commit is contained in:
parent
6975849702
commit
e697720c94
1 changed files with 2 additions and 1 deletions
|
@ -374,7 +374,8 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
|
||||||
(setq doom-modeline-project-root
|
(setq doom-modeline-project-root
|
||||||
(file-local-name
|
(file-local-name
|
||||||
(or
|
(or
|
||||||
(when (featurep 'projectile) (projectile-project-root))
|
(when (featurep 'projectile)
|
||||||
|
(ignore-errors (projectile-project-root)))
|
||||||
(when (featurep 'project)
|
(when (featurep 'project)
|
||||||
(when-let ((project (project-current)))
|
(when-let ((project (project-current)))
|
||||||
(expand-file-name (car (project-roots project)))))
|
(expand-file-name (car (project-roots project)))))
|
||||||
|
|
Loading…
Reference in a new issue