Function: ede-find-subproject-for-directory
ede-find-subproject-for-directory is a byte-compiled function defined
in files.el.gz.
Signature
(ede-find-subproject-for-directory ARG &rest ARGS)
Implementations
((proj ede-generic-project) dir) in `ede/generic.el'.
Return PROJ, for handling all subdirs below DIR.
((proj ede-linux-project) dir) in `ede/linux.el'.
Return PROJ, for handling all subdirs below DIR.
((proj ede-cpp-root-project) dir) in `ede/cpp-root.el'.
Return PROJ, for handling all subdirs below DIR.
((proj ede-project-placeholder) dir) in `ede/files.el'.
Find a subproject of PROJ that corresponds to DIR.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/ede/files.el.gz
(cl-defmethod ede-find-subproject-for-directory ((proj ede-project-placeholder)
dir)
"Find a subproject of PROJ that corresponds to DIR."
(if ede--disable-inode
(let ((ans nil)
(fulldir (file-truename dir)))
;; Try to find the right project w/out inodes.
(ede-map-subprojects
proj
(lambda (SP)
(when (not ans)
(if (string= fulldir (file-truename (oref SP directory)))
(setq ans SP)
(ede-find-subproject-for-directory SP dir)))))
ans)
;; We can use inodes, so let's try it.
(let ((ans nil)
(inode (ede--inode-for-dir dir)))
(ede-map-subprojects
proj
(lambda (SP)
(when (not ans)
(if (equal (ede--project-inode SP) inode)
(setq ans SP)
(setq ans (ede-find-subproject-for-directory SP dir))))))
ans)))