emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 05/08: Teach ggtags-create-tags to retry if mkid is missing


From: Leo Liu
Subject: [elpa] 05/08: Teach ggtags-create-tags to retry if mkid is missing
Date: Sun, 23 Feb 2014 09:58:11 +0000

leoliu pushed a commit to branch master
in repository elpa.

commit 3d7f273ca1f01b3b252a3ed2e19f3500990c28f0
Author: Leo Liu <address@hidden>
Date:   Sun Feb 23 12:24:56 2014 +0800

    Teach ggtags-create-tags to retry if mkid is missing
---
 ggtags.el |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ggtags.el b/ggtags.el
index df4cf00..1383817 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -444,8 +444,15 @@ properly update `ggtags-mode-map'."
           (setenv "GTAGSLABEL" "ctags"))
      (with-temp-message "`gtags' in progress..."
        (let ((default-directory (file-name-as-directory root)))
-         (apply #'ggtags-process-string
-                "gtags" (and ggtags-use-idutils '("--idutils"))))))
+         (condition-case err
+             (apply #'ggtags-process-string
+                    "gtags" (and ggtags-use-idutils '("--idutils")))
+           (error (if (and ggtags-use-idutils
+                           (stringp (cadr err))
+                           (string-match-p "mkid not found" (cadr err)))
+                      ;; Retry without mkid
+                      (ggtags-process-string "gtags")
+                    (signal (car err) (cdr err))))))))
     (message "GTAGS generated in `%s'" root)
     root))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]