[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 10/18: Make ggtags-eldoc-function work better when no project roo
From: |
Leo Liu |
Subject: |
[elpa] 10/18: Make ggtags-eldoc-function work better when no project root |
Date: |
Sat, 05 Apr 2014 01:25:16 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 8f3bd01d82f916b03227f1bbe3683be39b62280f
Author: Leo Liu <address@hidden>
Date: Thu Apr 3 08:24:50 2014 +0800
Make ggtags-eldoc-function work better when no project root
Make M-. on #include line also triggers indexing project if not
already.
---
ggtags.el | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 8c97c49..fb9627d 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -778,6 +778,7 @@ When called interactively with a prefix arg, always find
definition tags."
(interactive
(let ((include (and (not current-prefix-arg) (ggtags-include-file))))
+ (ggtags-ensure-project)
(if include (list include 'include)
(list (ggtags-read-tag 'definition current-prefix-arg)
(and current-prefix-arg 'definition)))))
@@ -1920,13 +1921,16 @@ to nil disables displaying this information.")
(`nil nil)
(tag (if (equal tag (car ggtags-eldoc-cache))
(cadr ggtags-eldoc-cache)
- (setq ggtags-eldoc-cache (list tag)) ;don't come back until done
- (let* ((ggtags-print-definition-function
- (lambda (s)
- (setq ggtags-eldoc-cache (list tag s))
- (eldoc-message s))))
- (ggtags-show-definition tag)
- nil)))))
+ (and ggtags-project-root (ggtags-find-project)
+ (let* ((ggtags-print-definition-function
+ (lambda (s)
+ (setq ggtags-eldoc-cache (list tag s))
+ (eldoc-message s))))
+ ;; Prevent multiple runs of ggtags-show-definition
+ ;; for the same tag.
+ (setq ggtags-eldoc-cache (list tag))
+ (ggtags-show-definition tag)
+ nil))))))
;;; imenu
- [elpa] branch master updated (c5636ba -> 769f2f2), Leo Liu, 2014/04/04
- [elpa] 04/18: Add NEWS to README.rst for 0.8.0 and 0.8.1, Leo Liu, 2014/04/04
- [elpa] 02/18: New function ggtags-echo and use it, Leo Liu, 2014/04/04
- [elpa] 01/18: For #45: Fix popping up/down window for search with single match, Leo Liu, 2014/04/04
- [elpa] 03/18: Fix #45: Change default value of ggtags-auto-jump-to-match, Leo Liu, 2014/04/04
- [elpa] 06/18: Fix error in approximation to (line-number-at-pos (point-max)), Leo Liu, 2014/04/04
- [elpa] 05/18: New function ggtags-eldoc-function for eldoc support, Leo Liu, 2014/04/04
- [elpa] 08/18: Don't activate eldoc support by default, Leo Liu, 2014/04/04
- [elpa] 09/18: Fix multiple calls of ggtags-show-definition, Leo Liu, 2014/04/04
- [elpa] 10/18: Make ggtags-eldoc-function work better when no project root,
Leo Liu <=
- [elpa] 07/18: Refactor out ggtags-include-file from ggtags-find-tag-dwim, Leo Liu, 2014/04/04
- [elpa] 12/18: Make ggtags-use-project-gtagsconf work on remote projects, Leo Liu, 2014/04/04
- [elpa] 11/18: Revert "Fix ggtags-with-current-project to include GTAGSCONF", Leo Liu, 2014/04/04
- [elpa] 13/18: New macro ggtags-with-temp-message that reports execution time, Leo Liu, 2014/04/04
- [elpa] 14/18: Don't reply on excution order of filter and sentinel functions, Leo Liu, 2014/04/04
- [elpa] 15/18: Revert "Don't reply on excution order of filter and sentinel functions", Leo Liu, 2014/04/04
- [elpa] 16/18: Properly fix the bug by delaying compilation finish functions, Leo Liu, 2014/04/04
- [elpa] 17/18: Doc fixes and add NEWS for 0.8.2, Leo Liu, 2014/04/04
- [elpa] 18/18: Merge branch 'master' of github.com:leoliu/ggtags, Leo Liu, 2014/04/04