Make sure to return some valid project root
* lisp/progmodes/project.el (project-prompt-project-dir): If the user just pressed RET on prompt, prompt again.
This commit is contained in:
parent
8c80430824
commit
9000aeaed4
1 changed files with 4 additions and 1 deletions
|
@ -1308,7 +1308,10 @@ It's also possible to enter an arbitrary directory not in the list."
|
|||
;; completion style).
|
||||
(project--file-completion-table
|
||||
(append project--list `(,dir-choice))))
|
||||
(pr-dir (completing-read "Select project: " choices nil t)))
|
||||
(pr-dir ""))
|
||||
(while (equal pr-dir "")
|
||||
;; If the user simply pressed RET, do this again until they don't.
|
||||
(setq pr-dir (completing-read "Select project: " choices nil t)))
|
||||
(if (equal pr-dir dir-choice)
|
||||
(read-directory-name "Select directory: " default-directory nil t)
|
||||
pr-dir)))
|
||||
|
|
Loading…
Add table
Reference in a new issue