project.el: Fix bug in project-ignores method for VC-aware backend

The variable `backend' was always nil preventing the 25-line long
`when' block from doing anything.  This bug was introduced in commit
785fa80159 "New user option:
project-vc-extra-root-markers". (Bug#65704)

* lisp/progmodes/project.el (project-ignores): Make sure the variable
is initialized, so that backend-specific code is used if any.
This commit is contained in:
Damien Cassou 2023-09-02 18:08:49 +02:00 committed by Dmitry Gutov
parent 781c03933e
commit c640e97887

View file

@ -733,11 +733,10 @@ See `project-vc-extra-root-markers' for the marker value format.")
(cl-defmethod project-ignores ((project (head vc)) dir)
(let* ((root (nth 2 project))
backend)
(backend (cadr project)))
(append
(when (and backend
(file-equal-p dir root))
(setq backend (cadr project))
(delq
nil
(mapcar