leoliu pushed a commit to branch master in repository elpa. commit 01d5974739db05d6fba8f58059b6ccdf4769410d Author: Leo Liu <sdl....@gmail.com> Date: Tue May 6 09:53:17 2014 +0800
For #52: new var ggtags-global-search-libpath-for-reference Update NEWS for 0.8.4. --- README.rst | 8 ++++++++ ggtags.el | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletions(-) diff --git a/README.rst b/README.rst index 22099eb..ceaf69d 100644 --- a/README.rst +++ b/README.rst @@ -283,6 +283,14 @@ Integration with other packages NEWS ~~~~ +[2014-05-06 Tue] 0.8.4 +++++++++++++++++++++++ + +#. ``M-.`` (``ggtags-find-tag-dwim``) is smarter on new files. +#. Always update tags for current file on save. +#. Can continue search ``GTAGSLIBPATH`` if search turns up 0 matches. + Customisable via ``ggtags-global-search-libpath-for-reference``. + [2014-04-12 Sat] 0.8.3 ++++++++++++++++++++++ diff --git a/ggtags.el b/ggtags.el index 6e005e4..52ec670 100644 --- a/ggtags.el +++ b/ggtags.el @@ -211,6 +211,15 @@ This affects `ggtags-find-file' and `ggtags-grep'." :type 'boolean :group 'ggtags) +;; See also https://github.com/leoliu/ggtags/issues/52 +(defcustom ggtags-global-search-libpath-for-reference t + "If non-nil global will search GTAGSLIBPATH for references. +Search is only continued in GTAGSLIBPATH if it finds no matches +in current project." + :safe 'booleanp + :type 'boolean + :group 'ggtags) + (defcustom ggtags-global-large-output 1000 "Number of lines in the Global buffer to indicate large output." :type 'number @@ -879,7 +888,8 @@ definition tags." (shell-quote-argument name))))) (defun ggtags-setup-libpath-search (type name) - (pcase (ggtags-get-libpath) + (pcase (and ggtags-global-search-libpath-for-reference + (ggtags-get-libpath)) ((and libs (guard libs)) (cl-labels ((cont (buf how) (pcase ggtags-global-exit-info