From: Dmitry Gutov Date: Wed, 22 Sep 2021 18:07:49 +0000 (+0300) Subject: Put './' in the project directory completions X-Git-Tag: emacs-28.0.90~736 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f06fe894cabf8f33e10386d6adb5d2ce9481a25;p=emacs.git 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). --- 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