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).
This commit is contained in:
Dmitry Gutov 2021-09-22 21:07:49 +03:00
parent 8816d67c61
commit 7f06fe894c

View file

@ -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