branch: externals/marginalia commit 3669f4d6f552cde7a898f90a6d945511367b8a29 Author: Omar Antolín <omar.anto...@gmail.com> Commit: Omar Antolín <omar.anto...@gmail.com>
Stop using the obsolete project-roots function I don't know if you agree with this change, @minad, feel to revert if you want to support project.el older than 0.3 for a little longer. I also added a TODO comment describing the limitation of our project file support, maybe that comment should be kept even if you do revert. --- marginalia.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/marginalia.el b/marginalia.el index 9ceb5fe..8456e7d 100644 --- a/marginalia.el +++ b/marginalia.el @@ -258,7 +258,7 @@ determine it." (declare-function package-desc-version "package") (declare-function package-version-join "package") (declare-function project-current "project") -(declare-function project-roots "project") +(declare-function project-root "project") (declare-function color-rgb-to-hex "color") (declare-function color-rgb-to-hsl "color") @@ -686,8 +686,11 @@ These annotations are skipped for remote paths." (defun marginalia-annotate-project-file (cand) "Annotate file CAND with its size, modification time and other attributes." + ;; TODO project-find-file can be called from outside all projects in + ;; which case it prompts for a project first; we don't support that + ;; case yet, since there is no current project. (when-let ((project (project-current)) - (root (car (project-roots project))) + (root (project-root project)) (file (expand-file-name cand root))) (marginalia-annotate-file file)))