;;; cedet-global.el --- GNU Global support for CEDET.
-;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
;; Package: cedet
(declare-function inversion-check-version "inversion")
(defvar cedet-global-min-version "5.0"
- "Minimum version of GNU global required.")
+ "Minimum version of GNU Global required.")
(defcustom cedet-global-command "global"
"Command name for the GNU Global executable."
(apply 'call-process cedet-global-gtags-command
nil b nil
flags)
+
+ ;; Check for warnings.
+ (with-current-buffer b
+ (goto-char (point-min))
+ (when (re-search-forward "Error\\|Warning" nil t)
+ (error "Output:\n%S" (buffer-string))))
+
b))
(defun cedet-gnu-global-expand-filename (filename)
(defun cedet-gnu-global-version-check (&optional noerror)
"Check the version of the installed GNU Global command.
-If optional programatic argument NOERROR is non-nil, then
-instead of throwing an error if Global isn't available, then
+If optional programmatic argument NOERROR is non-nil,
+then instead of throwing an error if Global isn't available,
return nil."
(interactive)
(require 'inversion)
nil)
(with-current-buffer b
(goto-char (point-min))
- (re-search-forward "GNU GLOBAL \\([0-9.]+\\)" nil t)
+ (re-search-forward "(?GNU GLOBAL)? \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(if (inversion-check-version rev nil cedet-global-min-version)
(if noerror
(let ((default-directory dir))
(cedet-gnu-global-gtags-call
(when root
- '("-i");; Incremental update flag.
- )))))
+ '("-u");; Incremental update flag.
+ ))
+ )
+ ))
(provide 'cedet-global)