From b647d6447b1d1a747b21a6f446dcc7bffcf9cba6 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 19 Jun 2021 19:45:55 +0100 Subject: [PATCH] fix(nativation): make consult-buffer (C-x b) work before projectile is loaded --- modules/navigation/siren-consult.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/navigation/siren-consult.el b/modules/navigation/siren-consult.el index 287d1d1..c4b8c3d 100644 --- a/modules/navigation/siren-consult.el +++ b/modules/navigation/siren-consult.el @@ -22,7 +22,13 @@ consult--source-project-buffer consult--source-project-file)) (consult-preview-max-count 10) - (consult-project-root-function 'projectile-project-root)) + (consult-project-root-function 'siren-consult-project-root) + + :init + (defun siren-consult-project-root (&rest args) + "Call projectile-project-root if defined, otherwise return empty string." + (if (fboundp 'projectile-project-root) + (apply 'projectile-project-root args) ""))) (provide 'siren-consult) ;;; siren-consult.el ends here