filename))
;;;###autoload
-(defun project-find-file-in-root ()
- "Call `find-file' with the current project root as `default-directory'.
+(defun project-find-file-in-root (filename)
+ "Edit file FILENAME.
-Unlike `project-find-file', this doesn't provide completion over the
-entire file tree.
-
-This is equivalent to running `project-any-command' with `find-file'."
- (interactive)
- (let* ((pr (project-current t))
- (default-directory (project-root pr)))
- (call-interactively #'find-file)))
+Interactively, prompt for FILENAME, defaulting to the root directory of
+the current project."
+ (interactive
+ (list (read-file-name "Find file in project: "
+ (project-root (project-current t)) nil
+ (confirm-nonexistent-file-or-buffer))))
+ (find-file filename t))
;;;###autoload
(defun project-find-file (&optional include-all)