core-spacemacs-buffer: fixed a bug

There is an unreported bug that when startup list is set to shown `recents-by-project`,
Emacs reports that `projectile-mode` is an unknown symbol.

This commit fixed this bug by checking the existence of `projectile-mode`, which is
automatically loaded during startup.
This commit is contained in:
Lucius Hu 2022-07-13 03:18:18 +00:00 committed by GitHub
parent 42b6ff3f09
commit 1aa28d9148
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1386,7 +1386,8 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(spacemacs-buffer//insert-errors)
(spacemacs-buffer//insert-warnings))
((eq el 'recents) (spacemacs-buffer//insert-recent-files list-size))
((eq el 'recents-by-project)
((and (eq el 'recents-by-project)
(fboundp 'projectile-mode))
(spacemacs-buffer//insert-recent-files-by-project list-size))
((eq el 'todos) (spacemacs-buffer//insert-todos list-size))
((eq el 'agenda) (spacemacs-buffer//insert-agenda list-size))