From 7f06fe894cabf8f33e10386d6adb5d2ce9481a25 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 22 Sep 2021 21:07:49 +0300 Subject: [PATCH] Put './' in the project directory completions * lisp/progmodes/project.el (project--read-file-cpd-relative): Put './' in the completions set when cpd was in the original (bug#50732). --- lisp/progmodes/project.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index ebd21d4b602..2eead0d0696 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -887,7 +887,13 @@ by the user at will." (prompt (if (zerop cpd-length) prompt (concat prompt (format " in %s" common-parent-directory)))) + (included-cpd (when (member common-parent-directory all-files) + (setq all-files + (delete common-parent-directory all-files)) + t)) (substrings (mapcar (lambda (s) (substring s cpd-length)) all-files)) + (_ (when included-cpd + (setq substrings (cons "./" substrings)))) (new-collection (project--file-completion-table substrings)) (res (project--completing-read-strict prompt new-collection -- 2.39.5