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

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

[elpa] 01/09: Be defensive in ggtags-find-project


From: Leo Liu
Subject: [elpa] 01/09: Be defensive in ggtags-find-project
Date: Tue, 25 Feb 2014 08:45:57 +0000

leoliu pushed a commit to branch master
in repository elpa.

commit 7ac798ff2399e182eb62a6c3166b4ec5070a2f1a
Author: Leo Liu <address@hidden>
Date:   Sun Feb 23 21:00:38 2014 +0800

    Be defensive in ggtags-find-project
---
 README.rst |    4 ++--
 ggtags.el  |   12 +++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/README.rst b/README.rst
index a8abbcc..ca30391 100644
--- a/README.rst
+++ b/README.rst
@@ -38,9 +38,9 @@ between a few tools.
 Screenshot
 ~~~~~~~~~~
 
-.. figure:: http://i.imgur.com/E5Gr56m.png
+.. figure:: http://i.imgur.com/r9nz3ss.png
    :width: 500px
-   :target: http://i.imgur.com/E5Gr56m.png
+   :target: http://i.imgur.com/r9nz3ss.png
    :alt: ggtags.png
 
 Config
diff --git a/ggtags.el b/ggtags.el
index bd39eaa..e297ecb 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.7.10
+;; Version: 0.7.11
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -335,11 +335,13 @@ properly update `ggtags-mode-map'."
                                   default-directory
                                   (lambda (dir)
                                     (file-regular-p (expand-file-name "GTAGS" 
dir)))))
-                  (file-truename gtags))))
+                  ;; `file-truename' may strip the trailing '/' on
+                  ;; remote hosts, see http://debbugs.gnu.org/16851
+                  (file-name-as-directory (file-truename gtags)))))
       (when ggtags-project-root
-        (or (gethash ggtags-project-root ggtags-projects)
-            (ggtags-make-project ggtags-project-root))
-        (ggtags-find-project)))))
+        (if (gethash ggtags-project-root ggtags-projects)
+            (ggtags-find-project)
+          (ggtags-make-project ggtags-project-root))))))
 
 (defun ggtags-current-project-root ()
   (and (ggtags-find-project)



reply via email to

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