]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix ggtags-global-exit-message-function
authorLeo Liu <sdl.web@gmail.com>
Thu, 31 Jan 2013 17:02:57 +0000 (01:02 +0800)
committerLeo Liu <sdl.web@gmail.com>
Thu, 31 Jan 2013 17:02:57 +0000 (01:02 +0800)
packages/ggtags/ggtags.el

index 120893b2e6d8438bbe7707407c49fe3f2d4f99a2..b3219c22914eb95fdc9815bb711c74f7345393bf 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ggtags.el --- GNU Global source code tagging system -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2013  Leo Liu
+;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <sdl.web@gmail.com>
 ;; Version: 0.5
@@ -217,9 +217,10 @@ If nil, use Emacs default."
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)
   (let ((count (save-excursion
-                 (goto-char (point-min))
-                 (and (re-search-forward "^\\([0-9]+\\) objects? located" nil t)
-                      (string-to-number (match-string 1))))))
+                 (goto-char (point-max))
+                 (if (re-search-backward "^\\([0-9]+\\) objects? located" nil t)
+                     (string-to-number (match-string 1))
+                   0))))
     (cons (if (> exit-status 0)
               msg
             (format "found %d %s" count (if (= count 1) "match" "matches")))