Function: cedet-cscope-support-for-directory

cedet-cscope-support-for-directory is an interactive and byte-compiled function defined in cedet-cscope.el.gz.

Signature

(cedet-cscope-support-for-directory &optional DIR)

Documentation

Return non-nil if CScope has a support file for DIR.

If DIR is not supplied, use the current default directory. This works by running cscope on a bogus symbol, and looking for the error code.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/cedet-cscope.el.gz
(defun cedet-cscope-support-for-directory (&optional dir)
  "Return non-nil if CScope has a support file for DIR.
If DIR is not supplied, use the current default directory.
This works by running cscope on a bogus symbol, and looking for
the error code."
  (interactive "DDirectory: ")
  (save-excursion
    (let ((default-directory (or dir default-directory)))
      (set-buffer (cedet-cscope-call (list "-d" "-L" "-7" "moose")))
      (goto-char (point-min))
      (let ((ans (looking-at "[^ \n]*cscope: ")))
	(if (called-interactively-p 'interactive)
	    (if ans
		(message "No support for CScope in %s" default-directory)
	      (message "CScope is supported in %s" default-directory))
	  (if ans
	      nil
	    t))))))