[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 04/14: New command ggtags-find-definition for #57
From: |
Leo Liu |
Subject: |
[elpa] 04/14: New command ggtags-find-definition for #57 |
Date: |
Sun, 22 Jun 2014 09:41:40 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 7b196dd8982326438def26a2886cb3822c37d969
Author: Leo Liu <address@hidden>
Date: Fri May 16 12:03:45 2014 +0800
New command ggtags-find-definition for #57
---
README.rst | 16 +++++++++++++---
ggtags.el | 7 ++++++-
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/README.rst b/README.rst
index 794e1cc..1c316ee 100644
--- a/README.rst
+++ b/README.rst
@@ -118,14 +118,23 @@ ggtags-find-tag-dwim
To force finding a definition tag, call it with a prefix (``C-u``).
-ggtags-find-reference
+ggtags-find-tag-mouse
+
+ Like ``ggtags-find-tag-dwim`` but suitable for binding to mouse
+ events.
+
+ggtags-find-definition
- Find references to a tag. With ``C-u`` ask for the tag name with
+ Find definition tags. With ``C-u`` ask for the tag name with
completion.
+ggtags-find-reference
+
+ Find reference tags. With ``C-u`` ask for the tag name with completion.
+
ggtags-find-other-symbol
- Find a tag that has no definition. With ``C-u`` ask for the tag
+ Find tags that have no definitions. With ``C-u`` ask for the tag
name with completion.
ggtags-find-tag-regexp
@@ -289,6 +298,7 @@ NEWS
+++++++++++++
#. New command ``ggtags-find-tag-mouse`` for mouse support.
+#. New command ``ggtags-find-definition``.
#. Variable ``ggtags-completing-read-function`` restored.
[2014-05-06 Tue] 0.8.4
diff --git a/ggtags.el b/ggtags.el
index 97ba132..b78384f 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -894,7 +894,7 @@ definition tags."
(not buffer-file-name)
(not (ggtags-project-has-refs (ggtags-find-project)))
(not (ggtags-project-file-p buffer-file-name)))
- (ggtags-find-tag 'definition (shell-quote-argument name)))
+ (ggtags-find-definition name))
(t (ggtags-find-tag (format "--from-here=%d:%s"
(line-number-at-pos)
(shell-quote-argument
@@ -910,6 +910,11 @@ definition tags."
(goto-char (posn-point (event-start event)))
(call-interactively #'ggtags-find-tag-dwim))))
+;; Another option for `M-.'.
+(defun ggtags-find-definition (name)
+ (interactive (list (ggtags-read-tag 'definition current-prefix-arg)))
+ (ggtags-find-tag 'definition (shell-quote-argument name)))
+
(defun ggtags-setup-libpath-search (type name)
(pcase (and ggtags-global-search-libpath-for-reference
(ggtags-get-libpath))
- [elpa] branch master updated (76cd6eb -> 4e171a5), Leo Liu, 2014/06/22
- [elpa] 01/14: Fix #54: New command ggtags-find-tag-mouse, Leo Liu, 2014/06/22
- [elpa] 02/14: Update doc strings and comments, Leo Liu, 2014/06/22
- [elpa] 03/14: Fix #56: Restore variable ggtags-completing-read-function, Leo Liu, 2014/06/22
- [elpa] 05/14: Fix #59: detect missing tag files and remove project cache, Leo Liu, 2014/06/22
- [elpa] 04/14: New command ggtags-find-definition for #57,
Leo Liu <=
- [elpa] 06/14: Make ggtags-create-tags invalidate ggtags-project-root, Leo Liu, 2014/06/22
- [elpa] 07/14: Fix #65: Clear ggtags-project-root based on default-directory, Leo Liu, 2014/06/22
- [elpa] 11/14: Fix #58: Search history can be manipulated with C-k and C-y, Leo Liu, 2014/06/22
- [elpa] 08/14: Fix #64: Bind M-s s to ggtags-navigation-isearch-forward, Leo Liu, 2014/06/22
- [elpa] 09/14: Fix #60: Declutter command and highlight tag in search history, Leo Liu, 2014/06/22
- [elpa] 10/14: Refactoring: Use a major mode for viewing search history, Leo Liu, 2014/06/22
- [elpa] 14/14: Merge branch 'master' of github.com:leoliu/ggtags, Leo Liu, 2014/06/22
- [elpa] 13/14: Fix ggtags-global-handle-exit to conditionally pop up window, Leo Liu, 2014/06/22
- [elpa] 12/14: Replace kill-buffer-and-window with ggtags-kill-window, Leo Liu, 2014/06/22