[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 10/38: Automatically use GTAGSCONF file at project root
From: |
Leo Liu |
Subject: |
[elpa] 10/38: Automatically use GTAGSCONF file at project root |
Date: |
Mon, 24 Mar 2014 09:31:33 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 0a1b6710acf31021b7da34076dbff019a044641d
Author: Leo Liu <address@hidden>
Date: Thu Mar 6 18:49:55 2014 +0800
Automatically use GTAGSCONF file at project root
---
ggtags.el | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 6eb3ee7..7ba1de2 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -111,6 +111,13 @@ automatically switches to 'global --single-update'."
:type 'boolean
:group 'ggtags)
+(defcustom ggtags-use-project-gtagsconf t
+ "Non-nil to automatically use GTAGSCONF file at project root.
+File .globalrc and gtags.conf are checked in order."
+ :safe 'booleanp
+ :type 'boolean
+ :group 'ggtags)
+
(defcustom ggtags-project-duration 600
"Seconds to keep information of a project in memory."
:type 'number
@@ -498,9 +505,13 @@ source trees. See Info node `(global)gtags' for details."
(setenv "GTAGSROOT" (expand-file-name
(directory-file-name (file-name-as-directory root))))
(ggtags-with-current-project
- (and (not (getenv "GTAGSLABEL"))
- (yes-or-no-p "Use `ctags' backend? ")
- (setenv "GTAGSLABEL" "ctags"))
+ (let ((conf (and ggtags-use-project-gtagsconf
+ (or (and (file-exists-p ".globalrc") ".globalrc")
+ (and (file-exists-p "gtags.conf") "gtags.conf")))))
+ (cond (conf (setenv "GTAGSCONF" (expand-file-name conf)))
+ ((and (not (getenv "GTAGSLABEL"))
+ (yes-or-no-p "Use `ctags' backend? "))
+ (setenv "GTAGSLABEL" "ctags"))))
(with-temp-message "`gtags' in progress..."
(let ((default-directory (file-name-as-directory root)))
(condition-case err
- [elpa] branch master updated (0601efd -> f11199d), Leo Liu, 2014/03/24
- [elpa] 02/38: Give ggtags-show-definition-function full information, Leo Liu, 2014/03/24
- [elpa] 01/38: New command ggtags-show-definition, Leo Liu, 2014/03/24
- [elpa] 08/38: Call ggtags-show-definition-function in the original buffer, Leo Liu, 2014/03/24
- [elpa] 03/38: Don't display buffer if ggtags-navigation-mode is exited, Leo Liu, 2014/03/24
- [elpa] 07/38: Fix some errors in ggtags-global-output, Leo Liu, 2014/03/24
- [elpa] 04/38: Combine ggtags-global-column and tag name search, Leo Liu, 2014/03/24
- [elpa] 06/38: Fix #34: New variable ggtags-global-always-update, Leo Liu, 2014/03/24
- [elpa] 09/38: Replace ignore-errors with condition-case-unless-debug, Leo Liu, 2014/03/24
- [elpa] 10/38: Automatically use GTAGSCONF file at project root,
Leo Liu <=
- [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, 2014/03/24