]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/cedet-global.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / cedet / cedet-global.el
index a6e94dcd5d9fca2e5286bf0359d54030aea8d41b..99bffcb16b5f208f42ab4c05d8b48b4f1bb23c30 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cedet-global.el --- GNU Global support for CEDET.
 
-;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 ;; Package: cedet
@@ -93,6 +93,13 @@ SCOPE is the scope of the search, such as 'project or 'subdirs."
     (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)
@@ -147,7 +154,7 @@ return nil."
          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
@@ -181,8 +188,10 @@ If a database already exists, then just update it."
     (let ((default-directory dir))
       (cedet-gnu-global-gtags-call
        (when root
-        '("-i");; Incremental update flag.
-        )))))
+        '("-u");; Incremental update flag.
+        ))
+      )
+    ))
 
 (provide 'cedet-global)