From: Dmitry Gutov Date: Tue, 12 May 2020 00:32:05 +0000 (+0300) Subject: Improve project name completion X-Git-Tag: emacs-28.0.90~7260^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9422fb5e686a66898c2de76226f8a404ab253136;p=emacs.git 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. --- 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. It's also possible to enter an arbitrary directory." (project--ensure-read-project-list) (let* ((dir-choice "... (choose a dir)") - (choices (append project--list `(,dir-choice))) - (pr-dir (completing-read "Project: " choices))) + (choices + ;; XXX: Just using this for the category (for the substring + ;; completion style). + (project--file-completion-table + (append project--list `(,dir-choice)))) + (pr-dir (completing-read "Project: " choices nil t))) (if (equal pr-dir dir-choice) (read-directory-name "Choose directory: " default-directory nil t) pr-dir)))