branch: externals/marginalia commit d2b43ed824366724345fb22d8612890f9ea616ce Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Use project-roots (project-root is Emacs 28) --- marginalia.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/marginalia.el b/marginalia.el index 6e07c26..1d3b7fe 100644 --- a/marginalia.el +++ b/marginalia.el @@ -254,7 +254,7 @@ determine it." (declare-function package-desc-version "package") (declare-function package-version-join "package") (declare-function project-current "project") -(declare-function project-root "project") +(declare-function project-roots "project") ;;;; Marginalia mode @@ -608,7 +608,7 @@ This function returns what would be the minibuffer contents after using `minibuffer-force-complete' on the candidate CAND." (if-let (win (active-minibuffer-window)) (with-current-buffer (window-buffer win) - (let* ((contents (minibuffer-contents)) + (let* ((contents (minibuffer-contents-no-properties)) (pt (- (point) (minibuffer-prompt-end))) (bounds (completion-boundaries (substring contents 0 pt) @@ -639,7 +639,7 @@ using `minibuffer-force-complete' on the candidate CAND." (defun marginalia-annotate-project-file (cand) "Annotate file CAND with its size, modification time and other attributes." (when-let ((project (project-current)) - (root (project-root project)) + (root (car (project-roots project))) (file (expand-file-name cand root))) (marginalia-annotate-file file)))