------------------------------------------------------------ revno: 344 committer: Leo Liu <sdl....@gmail.com> branch nick: elpa timestamp: Fri 2013-02-01 01:02:57 +0800 message: Fix ggtags-global-exit-message-function modified: packages/ggtags/ggtags.el
=== modified file 'packages/ggtags/ggtags.el' --- a/packages/ggtags/ggtags.el 2013-01-31 14:50:42 +0000 +++ b/packages/ggtags/ggtags.el 2013-01-31 17:02:57 +0000 @@ -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....@gmail.com> ;; Version: 0.5 @@ -217,9 +217,10 @@ (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")))