[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 17/38: Fix ggtags-with-current-project to include GTAGSCONF
From: |
Leo Liu |
Subject: |
[elpa] 17/38: Fix ggtags-with-current-project to include GTAGSCONF |
Date: |
Mon, 24 Mar 2014 09:31:35 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit e7c5371028912e07c37de2bf1c80c88bf51a1fea
Author: Leo Liu <address@hidden>
Date: Wed Mar 12 17:48:43 2014 +0800
Fix ggtags-with-current-project to include GTAGSCONF
---
ggtags.el | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 18f10b9..fa007a9 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -295,13 +295,15 @@ properly update `ggtags-mode-map'."
(:copier nil)
(:type vector)
:named)
- root tag-size has-refs has-path-style has-color dirty-p mtime timestamp)
+ root config tag-size has-refs has-path-style has-color dirty-p mtime
timestamp)
(defun ggtags-make-project (root)
(cl-check-type root string)
(pcase (nthcdr 5 (file-attributes (expand-file-name "GTAGS" root)))
(`(,mtime ,_ ,tag-size . ,_)
(let* ((default-directory (file-name-as-directory root))
+ (config (cl-some (lambda (c) (and (file-exists-p c) c))
+ '(".globalrc" "gtags.conf")))
(rtags-size (nth 7 (file-attributes "GRTAGS")))
(has-refs
(when rtags-size
@@ -322,6 +324,7 @@ properly update `ggtags-mode-map'."
'has-color))))
(puthash default-directory
(ggtags-project--make :root default-directory
+ :config config
:tag-size tag-size
:has-refs has-refs
:has-path-style has-path-style
@@ -481,7 +484,13 @@ Value is new modtime if updated."
(and ,gtagsroot (list (concat "GTAGSROOT=" ,gtagsroot)))
(and (ggtags-find-project)
(not (ggtags-project-has-refs (ggtags-find-project)))
- (list "GTAGSLABEL=ctags")))))
+ (list "GTAGSLABEL=ctags"))
+ (and ggtags-use-project-gtagsconf ,gtagsroot
+ (ggtags-project-config (ggtags-find-project))
+ (list (concat "GTAGSCONF="
+ (expand-file-name
(ggtags-project-config
+
(ggtags-find-project))
+ ,gtagsroot)))))))
(unwind-protect (save-current-buffer ,@body)
(setq ggtags-project-root ,root)))))
- [elpa] 07/38: Fix some errors in ggtags-global-output, (continued)
- [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, 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 <=
- [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
- [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