]> git.eshelyaron.com Git - emacs.git/commitdiff
(project--file-completion-table): Provide completion annotations
authorEshel Yaron <me@eshelyaron.com>
Tue, 18 Feb 2025 08:35:27 +0000 (09:35 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 18 Feb 2025 08:35:27 +0000 (09:35 +0100)
lisp/progmodes/project.el

index 8656c20bf26cb59822ece76475a061320f9f254e..3d437671d8c6eae50460191b0428916f6e08045c 100644 (file)
@@ -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))