branch: externals/gtags-mode commit 86a846e3b55f6098346b707c739af6c3276474ed Author: Aymeric Agon-Rambosson <aymeric.a...@yandex.com> Commit: Aymeric Agon-Rambosson <aymeric.a...@yandex.com>
Correct completion function to offer completions from GTAGSLIBPATH --- gtags-mode.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gtags-mode.el b/gtags-mode.el index 89a7127a7e..5e5d589329 100644 --- a/gtags-mode.el +++ b/gtags-mode.el @@ -261,9 +261,16 @@ completions usually from the cache when possible." (error "Calling `gtags-mode--list-completions' with no gtags-mode--plist")) ((and (stringp prefix) (not (string-match-p "\\`[ \t\n\r-]*\\'" prefix)) ;; not match empty or only - - (gtags-mode--exec-sync "--ignore-case" "--completion" prefix))) + (gtags-mode--exec-sync "--directory" + (file-local-name + (plist-get (gtags-mode--local-plist default-directory) :gtagsroot)) + "--ignore-case" "--through" "--completion" prefix))) ((plist-get gtags-mode--plist :cache)) - (t (plist-put gtags-mode--plist :cache (gtags-mode--exec-sync "--completion")) + (t (plist-put gtags-mode--plist :cache + (gtags-mode--exec-sync "--directory" + (file-local-name + (plist-get (gtags-mode--local-plist default-directory) :gtagsroot)) + "--through" "--completion")) (plist-get gtags-mode--plist :cache)))) (defun gtags-mode--filter-find-symbol (args symbol creator)