Function: semantic-symref-calculate-rootdir

semantic-symref-calculate-rootdir is a byte-compiled function defined in symref.el.gz.

Signature

(semantic-symref-calculate-rootdir)

Documentation

Calculate the root directory for a symref search.

Start with an EDE project, or use the default directory.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/symref.el.gz
(defun semantic-symref-calculate-rootdir ()
  "Calculate the root directory for a symref search.
Start with an EDE project, or use the default directory."
  (let* ((rootproj (when (and (featurep 'ede) ede-minor-mode)
		     (ede-toplevel)))
	 (rootdirbase (if rootproj
			  (ede-project-root-directory rootproj)
			default-directory)))
    (if (and rootproj (condition-case nil
			  ;; Hack for subprojects.
			  (oref rootproj metasubproject)
			(error nil)))
	(ede-up-directory rootdirbase)
      rootdirbase)))