Function: cedet-idutils-version-check
cedet-idutils-version-check is an interactive and byte-compiled
function defined in cedet-idutils.el.gz.
Signature
(cedet-idutils-version-check &optional NOERROR)
Documentation
Check the version of the installed ID Utils command.
If optional programmatic argument NOERROR is non-nil, then instead of throwing an error if Global isn't available, return nil.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/cedet-idutils.el.gz
(defun cedet-idutils-version-check (&optional noerror)
"Check the version of the installed ID Utils command.
If optional programmatic argument NOERROR is non-nil,
then instead of throwing an error if Global isn't available,
return nil."
(interactive)
(let ((b (condition-case nil
(cedet-idutils-fnid-call (list "--version"))
(error nil)))
(rev nil))
(if (not b)
(progn
(when (called-interactively-p 'interactive)
(message "ID Utils not found."))
nil)
(with-current-buffer b
(goto-char (point-min))
(if (re-search-forward "fnid - \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(setq rev "0"))
(if (version< rev cedet-idutils-min-version)
(if noerror
nil
(error "Version of ID Utils is %s. Need at least %s"
rev cedet-idutils-min-version))
;; Else, return TRUE, as in good enough.
(when (called-interactively-p 'interactive)
(message "ID Utils %s - Good enough for CEDET." rev))
t)))))