Function: ede-directory-project-cons

ede-directory-project-cons is a byte-compiled function defined in files.el.gz.

Signature

(ede-directory-project-cons DIR &optional FORCE)

Documentation

Return a project CONS (ROOTDIR . AUTOLOAD) for DIR.

If there is no project in DIR, return nil. Optional FORCE means to ignore the hash of known directories.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/files.el.gz
(defun ede-directory-project-cons (dir &optional force)
  "Return a project CONS (ROOTDIR . AUTOLOAD) for DIR.
If there is no project in DIR, return nil.
Optional FORCE means to ignore the hash of known directories."
  (when (not (file-exists-p (expand-file-name ".ede-ignore" dir)))
    (let* ((dirtest (expand-file-name dir))
	   (match (ede--directory-project-from-hash dirtest)))
      (cond
       ((and (eq match 'nomatch) (not force))
	nil)
       ((and match (not (eq match 'nomatch)))
	match)
       (t
	;; First time here?  Use the detection code to identify if we have
	;; a project here.
	(let* ((detect (ede-detect-directory-for-project dirtest))
	       (autoloader (cdr detect))) ;; autoloader
	  (when autoloader (require (oref autoloader file)))
	  (ede--directory-project-add-description-to-hash dirtest (or detect 'nomatch))
	  detect)
	)))))