Function: ede-toplevel

ede-toplevel is a byte-compiled function defined in base.el.gz.

Signature

(ede-toplevel &optional SUBPROJ)

Documentation

Return the ede project which is the root of the current project.

Optional argument SUBPROJ indicates a subproject to start from instead of the current project.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/base.el.gz
;;; TOPLEVEL PROJECT
;;
;; The toplevel project is a way to identify the EDE structure that belongs
;; to the top of a project.

(defun ede-toplevel (&optional subproj)
  "Return the ede project which is the root of the current project.
Optional argument SUBPROJ indicates a subproject to start from
instead of the current project."
  (or (when (not subproj) ede-object-root-project)
      (let* ((cp (or subproj (ede-current-project))))
	(or (and cp (ede-project-root cp))
	    (progn
	      (while (ede-parent-project cp)
		(setq cp (ede-parent-project cp)))
	      cp)))))