diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2021-09-22 21:07:49 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2021-09-22 21:08:42 +0300 |
commit | 7f06fe894cabf8f33e10386d6adb5d2ce9481a25 (patch) | |
tree | 69d3b018a7786f65304767ff6e59f7f17434ae72 /lisp/progmodes | |
parent | 8816d67c6102876aa09ea7dcb1d0c0541a4315a8 (diff) | |
download | emacs-7f06fe894cabf8f33e10386d6adb5d2ce9481a25.tar.gz emacs-7f06fe894cabf8f33e10386d6adb5d2ce9481a25.tar.bz2 emacs-7f06fe894cabf8f33e10386d6adb5d2ce9481a25.zip |
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).
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/project.el | 6 |
1 files changed, 6 insertions, 0 deletions
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 |