Leave signaling the exact error to cl-generic's internals
* lisp/progmodes/project.el (project-root): Extract default definition to a new method, predicated on a context (https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00771.html).
This commit is contained in:
parent
82c3bd1e4a
commit
c28ba11778
1 changed files with 6 additions and 4 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue