Function: projectile-doctor--root-function

projectile-doctor--root-function is a byte-compiled function defined in projectile.el.

Signature

(projectile-doctor--root-function DIR)

Documentation

Return the projectile-project-root-functions entry that roots DIR.

That is the first function in the list to return a project root for DIR, which is the one whose answer function projectile-project-root(var)/projectile-project-root(fun) used. Returns nil when no function claims DIR.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-doctor--root-function (dir)
  "Return the `projectile-project-root-functions' entry that roots DIR.
That is the first function in the list to return a project root for
DIR, which is the one whose answer function `projectile-project-root'
used.  Returns nil when no function claims DIR."
  (let ((true-dir (ignore-errors (file-truename dir))))
    (seq-find (lambda (func)
                (ignore-errors
                  (funcall func (if (eq func 'projectile-root-local)
                                    dir
                                  (or true-dir dir)))))
              projectile-project-root-functions)))