Subject: [PATCH] project.el: Fix bug in project-ignores

From: Damien Cassou <[email-masked]>
Date: Sat, 02 Sep 2023 18:17:33 +0200

In case what I said in the issue's description is correct, please find
attach a possible patch.

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
>From f04731cc2a31510163dc2ed484f47467ea88f036 Mon Sep 17 00:00:00 2001
From: Damien Cassou <[email-masked]>
Date: Sat, 2 Sep 2023 18:08:49 +0200
Subject: [PATCH] project.el: Fix bug in project-ignores

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

* lisp/progmodes/project.el: (project-ignores) Use backend-specific
code if possible.
---
 lisp/progmodes/project.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 37db677943a..29a81c7e151 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -733,11 +733,10 @@ project--git-submodules
 
 (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
-- 
2.41.0