emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/marginalia 3669f4d 224/241: Stop using the obsolete pro


From: Stefan Monnier
Subject: [elpa] externals/marginalia 3669f4d 224/241: Stop using the obsolete project-roots function
Date: Fri, 28 May 2021 20:49:31 -0400 (EDT)

branch: externals/marginalia
commit 3669f4d6f552cde7a898f90a6d945511367b8a29
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@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)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]