diff options
| author | Dmitry Gutov | 2020-05-12 03:32:05 +0300 |
|---|---|---|
| committer | Simen Heggestøyl | 2020-05-26 17:41:24 +0200 |
| commit | 9422fb5e686a66898c2de76226f8a404ab253136 (patch) | |
| tree | 2a30f3a5210c5066e11495be65c94af56d979a16 | |
| parent | 9f88356b6770fb710c47e277dbdb4ba31b463d08 (diff) | |
| download | emacs-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.el | 8 |
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. | |||
| 763 | It's also possible to enter an arbitrary directory." | 763 | It'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))) |