[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 25/38: Fix ggtags-find-project to check on the GTAGS file
From: |
Leo Liu |
Subject: |
[elpa] 25/38: Fix ggtags-find-project to check on the GTAGS file |
Date: |
Mon, 24 Mar 2014 09:31:36 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 28e6316d31472d8329e1651aa5d553ad426026ca
Author: Leo Liu <address@hidden>
Date: Thu Mar 20 08:58:52 2014 +0800
Fix ggtags-find-project to check on the GTAGS file
Note: this is to reduce false positives in case-insensitive file
systems.
Improve ggtags-include-pattern to strip leading ../ in path.
---
ggtags.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index b686eda..b3def18 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -111,7 +111,7 @@ automatically switches to 'global --single-update'."
:group 'ggtags)
(defcustom ggtags-include-pattern
- '("^\\s-*#\\(?:include\\|import\\)\\s-*[\"<]\\(.*?\\)[\">]" . 1)
+ '("^\\s-*#\\(?:include\\|import\\)\\s-*[\"<]\\(?:[./]*\\)?\\(.*?\\)[\">]" .
1)
"Pattern used to detect #include files.
Value can be (REGEXP . SUB) or a function with no arguments."
:type '(choice (const :tag "Disable" nil)
@@ -411,11 +411,11 @@ Value is new modtime if updated."
;;
;; Note: `locate-dominating-file' doesn't accept
;; function for NAME before 24.3.
- (let ((gtags (locate-dominating-file default-directory
"GTAGS")))
+ (let ((dir (locate-dominating-file default-directory "GTAGS")))
;; `file-truename' may strip the trailing '/' on
;; remote hosts, see http://debbugs.gnu.org/16851
- (and gtags (file-regular-p gtags)
- (file-name-as-directory (file-truename gtags))))))
+ (and dir (file-regular-p (expand-file-name "GTAGS" dir))
+ (file-name-as-directory (file-truename dir))))))
(when ggtags-project-root
(if (gethash ggtags-project-root ggtags-projects)
(ggtags-find-project)
- [elpa] 10/38: Automatically use GTAGSCONF file at project root, (continued)
- [elpa] 10/38: Automatically use GTAGSCONF file at project root, Leo Liu, 2014/03/24
- [elpa] 05/38: Improve completion support for all tag types, Leo Liu, 2014/03/24
- [elpa] 11/38: Make last change acutally work, Leo Liu, 2014/03/24
- [elpa] 12/38: Fix compatibility for locate-dominating-file, Leo Liu, 2014/03/24
- [elpa] 14/38: Display project root directory name on mode-line, Leo Liu, 2014/03/24
- [elpa] 22/38: New command ggtags-navigation-isearch-forward, Leo Liu, 2014/03/24
- [elpa] 17/38: Fix ggtags-with-current-project to include GTAGSCONF, Leo Liu, 2014/03/24
- [elpa] 19/38: Use read-only-mode in ggtags-toggle-project-read-only, Leo Liu, 2014/03/24
- [elpa] 18/38: Fix #36: Allow customising path to global's exectuables, Leo Liu, 2014/03/24
- [elpa] 20/38: Teach ggtags-find-tag-dwim to detect #include files, Leo Liu, 2014/03/24
- [elpa] 25/38: Fix ggtags-find-project to check on the GTAGS file,
Leo Liu <=
- [elpa] 23/38: Simplify ggtags-save-to-register by always re-do the search, Leo Liu, 2014/03/24
- [elpa] 21/38: Add new command ggtags-save-to-register for #37, Leo Liu, 2014/03/24
- [elpa] 16/38: Fix ggtags-show-definition to run in current project, Leo Liu, 2014/03/24
- [elpa] 24/38: Fix thinko in "Don't display buffer if ggtags-navigation-mode is exited", Leo Liu, 2014/03/24
- [elpa] 26/38: New macro ignore-errors-unless-debug and use it, Leo Liu, 2014/03/24
- [elpa] 15/38: Small fixes to last change, Leo Liu, 2014/03/24
- [elpa] 32/38: Bind ggtags-save-to-register in ggtags-global-rerun-search-map, Leo Liu, 2014/03/24
- [elpa] 28/38: New helper ggtags-forward-to-line and use it, Leo Liu, 2014/03/24
- [elpa] 27/38: Cosmetic change: Fix indentation, Leo Liu, 2014/03/24
- [elpa] 29/38: New feature ggtags-global-restore-search for #37, Leo Liu, 2014/03/24