From: Eshel Yaron Date: Tue, 18 Feb 2025 08:35:27 +0000 (+0100) Subject: (project--file-completion-table): Provide completion annotations X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d21dc35e0cd7afd8fb2d4d9657681b622394463b;p=emacs.git (project--file-completion-table): Provide completion annotations --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 8656c20bf26..3d437671d8c 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -320,7 +320,11 @@ end it with `/'. DIR must be either `project-root' or one of grep-find-ignored-files))) (defun project--file-completion-table (all-files) - (completion-table-with-metadata all-files '((category . project-file)))) + (completion-table-with-metadata + all-files + `((category . project-file) + ,@(when completions-detailed + '((affixation-function . completion-file-name-affixation)))))) (cl-defmethod project-root ((project (head transient))) (cdr project))