Function: projectile-doctor--root-marker

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

Signature

(projectile-doctor--root-marker FUNC ROOT)

Documentation

Return the marker file in ROOT that made FUNC report it as a root.

Returns nil for a root function with no marker list of its own (e.g. projectile-root-local, which reads a buffer-local variable) or when no marker can be pinned down.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-doctor--root-marker (func root)
  "Return the marker file in ROOT that made FUNC report it as a root.
Returns nil for a root function with no marker list of its own (e.g.
`projectile-root-local', which reads a buffer-local variable) or when
no marker can be pinned down."
  (when-let* ((markers (pcase func
                         ('projectile-root-marked
                          (list projectile-dirconfig-file))
                         ('projectile-root-bottom-up
                          projectile-project-root-files-bottom-up)
                         ('projectile-root-top-down
                          projectile-project-root-files)
                         ('projectile-root-top-down-recurring
                          projectile-project-root-files-top-down-recurring))))
    (seq-find (lambda (marker)
                (ignore-errors
                  (projectile-file-exists-p
                   (projectile-expand-file-name-wildcard marker root))))
              markers)))