Function: projection-project-type
projection-project-type is a natively compiled function defined in
projection-core-match.el.
Signature
(projection-project-type ROOT-DIR &optional MUST-MATCH)
Documentation
Determine the project type for ROOT-DIR.
With MUST-MATCH an error will be raised if no project type could be matched.
Source Code
;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-core-match.el
(defun projection-project-type (root-dir &optional must-match)
"Determine the project type for ROOT-DIR.
With MUST-MATCH an error will be raised if no project type could be matched."
(or
(when-let* ((type (projection--cache-get root-dir 'type)))
(projection--name-to-type type))
(when-let* ((project-type
(when projection-primary-project-type
(projection--name-to-type projection-primary-project-type))))
project-type)
(when-let* ((project-type (projection--match-project-type root-dir)))
(projection--cache-put root-dir 'type (oref project-type name))
project-type)
(when (and must-match
(not projection-default-type))
(error "Could not determine current project type for %s" root-dir))
projection-default-type))