Function: project-try-vc
project-try-vc is a byte-compiled function defined in project.el.gz.
Signature
(project-try-vc DIR)
Documentation
Returns a project value corresponding to DIR from the VC-aware backend.
The value is cached, and depending on whether MAYBE-PROMPT was non-nil
in the project-current call, the timeout is determined by
project-vc-cache-timeout or project-vc-non-essential-cache-timeout.
Probably introduced at or before Emacs version 30.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
(defun project-try-vc (dir)
"Returns a project value corresponding to DIR from the VC-aware backend.
The value is cached, and depending on whether MAYBE-PROMPT was non-nil
in the `project-current' call, the timeout is determined by
`project-vc-cache-timeout' or `project-vc-non-essential-cache-timeout'."
(let* ((timeout (if non-essential
project-vc-non-essential-cache-timeout
project-vc-cache-timeout))
(cached (project--get-cached dir 'project-vc timeout)))
(if (eq cached 'none)
nil
(or cached
(let ((res (project-try-vc--search dir timeout)))
(project--set-cached dir 'project-vc (or res 'none))
res)))))