Better project-find-file error in empty project
* lisp/progmodes/project.el (project--read-file-name): Signal a user-error and don't call project-read-file-name-function if the file name collection is empty, since the default options for project-read-file-name-function expect a cons (bug#80509). (project-find-file-in): Avoid redundant consing for vc-directory-exclusion-list in default case of include-all=nil.
This commit is contained in:
@@ -1372,6 +1372,8 @@ by the user at will."
|
||||
|
||||
Depending on `project-file-history-behavior', entries are made
|
||||
project-relative where possible."
|
||||
(unless all-files
|
||||
(user-error "Empty file list"))
|
||||
(let ((file
|
||||
(cl-letf ((history-add-new-input nil)
|
||||
((symbol-value hist)
|
||||
@@ -1400,7 +1402,8 @@ directories listed in `vc-directory-exclusion-list'."
|
||||
(let* ((vc-dirs-ignores (mapcar
|
||||
(lambda (dir)
|
||||
(concat dir "/"))
|
||||
vc-directory-exclusion-list))
|
||||
(and include-all
|
||||
vc-directory-exclusion-list)))
|
||||
(all-files
|
||||
(if include-all
|
||||
(mapcan
|
||||
|
||||
Reference in New Issue
Block a user