summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/project.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 65897b008ca..bd552c917ac 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -216,10 +216,12 @@ of the project instance object."
It usually contains the main build file, dependencies
configuration file, etc. Though neither is mandatory.
-The directory name must be absolute."
- (if project--within-roots-fallback
- (signal 'cl-no-applicable-method (list 'project-root project))
- (car (project-roots project))))
+The directory name must be absolute.")
+
+(cl-defmethod project-root (project
+ &context (project--within-roots-fallback
+ (eql nil)))
+ (car (project-roots project)))
(cl-defgeneric project-roots (project)
"Return the list containing the current project root.