Function: cedet-gnu-global-root

cedet-gnu-global-root is a byte-compiled function defined in cedet-global.el.gz.

Signature

(cedet-gnu-global-root &optional DIR)

Documentation

Return the root of any GNU Global scanned project containing DIR.

Returns nil if no GNU Global project can be found. DIR defaults to default-directory.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/cedet-global.el.gz
(defun cedet-gnu-global-root (&optional dir)
  "Return the root of any GNU Global scanned project containing DIR.
Returns nil if no GNU Global project can be found.
DIR defaults to `default-directory'."
  (let ((default-directory (or dir default-directory)))
    (with-current-buffer (cedet-gnu-global-call (list "-pq"))
      (goto-char (point-min))
      (when (not (eobp))
	(file-name-as-directory
         (buffer-substring (point) (line-end-position)))))))