Function: ede-detect-directory-for-project
ede-detect-directory-for-project is a byte-compiled function defined
in detect.el.gz.
Signature
(ede-detect-directory-for-project DIRECTORY)
Documentation
Detect an EDE project for the current DIRECTORY.
Scan the filesystem for a project.
Return a cons cell:
( ROOTDIR . PROJECT-AUTOLOAD)
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/ede/detect.el.gz
;;; TOP LEVEL SCAN
;;
;; This function for combining the above scans.
(defun ede-detect-directory-for-project (directory)
"Detect an EDE project for the current DIRECTORY.
Scan the filesystem for a project.
Return a cons cell:
( ROOTDIR . PROJECT-AUTOLOAD)"
(let* ((scan (ede--detect-scan-directory-for-project directory))
(root (car scan))
(auto (cdr scan)))
(when scan
;; If what we found is already a root-only project, return it.
(if (oref auto root-only)
scan
;; If what we found is a generic project, check to make sure we aren't
;; in some other kind of root project.
(if (oref auto generic-p)
(let ((moreroot (ede--detect-scan-directory-for-rootonly-project root)))
;; If we found a rootier project, return that.
(if moreroot
moreroot
;; If we didn't find a root from the generic project, then
;; we need to rescan upward.
(cons (ede--detect-scan-directory-for-project-root root auto) auto)))
;; Non-generic non-root projects also need to rescan upward.
(cons (ede--detect-scan-directory-for-project-root root auto) auto)))
)))