branch: externals/company commit 056d19d54af1447f60f2329774e6c5abf98a91cb Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
Rename a function and add NEWS entry --- NEWS.md | 2 ++ company-gtags.el | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index b91d56a..38ef038 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ ## Next +* `company-gtags` on remote hosts is improved + ([#1037](https://github.com/company-mode/company-mode/pull/1037)). * New commands `company-select-first` and `company-select-last`. * `company-tng-mode` has been added to replace both `company-tng-configure-default` and the manual method of enabling diff --git a/company-gtags.el b/company-gtags.el index 86038a3..f298c67 100644 --- a/company-gtags.el +++ b/company-gtags.el @@ -63,7 +63,7 @@ completion." (locate-dominating-file buffer-file-name "GTAGS")) company-gtags--tags-available-p)) -(defun company-gtags--executable-p () +(defun company-gtags--executable () (cond ((not (eq company-gtags--executable 'unknown)) ;; the value is already cached company-gtags--executable) @@ -95,7 +95,7 @@ completion." (let ((temp-buffer (current-buffer))) (when (with-current-buffer caller-buffer ;; Execute the command in the local buffer but output in the temporal one. - (/= 3 (process-file (company-gtags--executable-p) nil + (/= 3 (process-file (company-gtags--executable) nil ;; "-T" goes through all the tag files listed in GTAGSLIBPATH temp-buffer nil "-xGqT" (concat "^" prefix)))) (goto-char (point-min)) @@ -126,7 +126,7 @@ completion." (interactive (list 'interactive)) (cl-case command (interactive (company-begin-backend 'company-gtags)) - (prefix (and (company-gtags--executable-p) + (prefix (and (company-gtags--executable) buffer-file-name (apply #'derived-mode-p company-gtags-modes) (not (company-in-string-or-comment))