[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7f06fe8: Put './' in the project directory completions
From: |
Dmitry Gutov |
Subject: |
master 7f06fe8: Put './' in the project directory completions |
Date: |
Wed, 22 Sep 2021 14:22:10 -0400 (EDT) |
branch: master
commit 7f06fe894cabf8f33e10386d6adb5d2ce9481a25
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
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 ebd21d4..2eead0d 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 7f06fe8: Put './' in the project directory completions,
Dmitry Gutov <=