leoliu pushed a commit to branch master in repository elpa. commit a7a3c8102010ca9e945d2df5f29b4c88e6ce722f Author: Leo Liu <sdl....@gmail.com> Date: Wed May 7 10:35:58 2014 +0800
Fix #54: New command ggtags-find-tag-mouse --- README.rst | 5 +++++ ggtags.el | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index ceaf69d..60af593 100644 --- a/README.rst +++ b/README.rst @@ -283,6 +283,11 @@ Integration with other packages NEWS ~~~~ +[devel] 0.8.5 ++++++++++++++ + +#. New command ``ggtags-find-tag-mouse`` for mouse support. + [2014-05-06 Tue] 0.8.4 ++++++++++++++++++++++ diff --git a/ggtags.el b/ggtags.el index 52ec670..a450461 100644 --- a/ggtags.el +++ b/ggtags.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2013-2014 Free Software Foundation, Inc. ;; Author: Leo Liu <sdl....@gmail.com> -;; Version: 0.8.4 +;; Version: 0.8.5 ;; Keywords: tools, convenience ;; Created: 2013-01-29 ;; URL: https://github.com/leoliu/ggtags @@ -875,8 +875,7 @@ definition tags." (ggtags-find-file name)) ((or (eq what 'definition) (not buffer-file-name) - (and (ggtags-find-project) - (not (ggtags-project-has-refs (ggtags-find-project)))) + (not (ggtags-project-has-refs (ggtags-find-project))) (not (ggtags-project-file-p buffer-file-name))) (ggtags-find-tag 'definition (shell-quote-argument name))) (t (ggtags-find-tag (format "--from-here=%d:%s" @@ -887,6 +886,13 @@ definition tags." (ggtags-project-relative-file buffer-file-name))) (shell-quote-argument name))))) +(defun ggtags-find-tag-mouse (event) + (interactive "e") + (with-selected-window (posn-window (event-start event)) + (save-excursion + (goto-char (posn-point (event-start event))) + (call-interactively #'ggtags-find-tag-dwim)))) + (defun ggtags-setup-libpath-search (type name) (pcase (and ggtags-global-search-libpath-for-reference (ggtags-get-libpath))