summaryrefslogtreecommitdiff
path: root/lisp/progmodes/project.el
diff options
context:
space:
mode:
authorGerd Möllmann <gerd@gnu.org>2022-12-31 09:04:56 +0100
committerGerd Möllmann <gerd@gnu.org>2022-12-31 09:04:56 +0100
commit716d676747119f9950861f9a64a8e7871b0082d4 (patch)
treeb71f94b50896736a007d6977c97679e1abd895a6 /lisp/progmodes/project.el
parent54ec3973e298c3d2b3d81484f80053d881694f88 (diff)
parent7493b4026fc74a51c76c5b614bc83b864af9bc31 (diff)
downloademacs-scratch/pkg.tar.gz
Merge remote-tracking branch 'origin/master' into scratch/pkgscratch/pkg
Diffstat (limited to 'lisp/progmodes/project.el')
-rw-r--r--lisp/progmodes/project.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 559da6dd649..c2633798473 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1040,12 +1040,14 @@ by the user at will."
(setq substrings (cons "./" substrings))))
(new-collection (project--file-completion-table substrings))
(abbr-cpd (abbreviate-file-name common-parent-directory))
+ (abbr-cpd-length (length abbr-cpd))
(relname (cl-letf ((history-add-new-input nil)
((symbol-value hist)
(mapcan
(lambda (s)
(and (string-prefix-p abbr-cpd s)
- (list (substring s (length abbr-cpd)))))
+ (not (eq abbr-cpd-length (length s)))
+ (list (substring s abbr-cpd-length))))
(symbol-value hist))))
(project--completing-read-strict prompt
new-collection