aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2020-05-12 03:32:05 +0300
committerSimen Heggestøyl2020-05-26 17:41:24 +0200
commit9422fb5e686a66898c2de76226f8a404ab253136 (patch)
tree2a30f3a5210c5066e11495be65c94af56d979a16
parent9f88356b6770fb710c47e277dbdb4ba31b463d08 (diff)
downloademacs-9422fb5e686a66898c2de76226f8a404ab253136.tar.gz
emacs-9422fb5e686a66898c2de76226f8a404ab253136.zip
Improve project name completion
* lisp/progmodes/project.el: (project-prompt-project-dir): Use REQUIRE-MATCH=t. Make sure the 'substring' completion style is used by default.
-rw-r--r--lisp/progmodes/project.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index fd691be5599..3e943ca0533 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -763,8 +763,12 @@ The project is chosen among projects known from the project list.
763It's also possible to enter an arbitrary directory." 763It's also possible to enter an arbitrary directory."
764 (project--ensure-read-project-list) 764 (project--ensure-read-project-list)
765 (let* ((dir-choice "... (choose a dir)") 765 (let* ((dir-choice "... (choose a dir)")
766 (choices (append project--list `(,dir-choice))) 766 (choices
767 (pr-dir (completing-read "Project: " choices))) 767 ;; XXX: Just using this for the category (for the substring
768 ;; completion style).
769 (project--file-completion-table
770 (append project--list `(,dir-choice))))
771 (pr-dir (completing-read "Project: " choices nil t)))
768 (if (equal pr-dir dir-choice) 772 (if (equal pr-dir dir-choice)
769 (read-directory-name "Choose directory: " default-directory nil t) 773 (read-directory-name "Choose directory: " default-directory nil t)
770 pr-dir))) 774 pr-dir)))