branch: externals/company commit 05cd0bcfb360d6953ef056078f8c3fe76866ecb9 Author: YE <y...@ego.team> Commit: YE <y...@ego.team>
Fix compilation warnings on Emacs 25-26 --- company-gtags.el | 7 +++++-- test/core-tests.el | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/company-gtags.el b/company-gtags.el index d1eaa4f..7599e40 100644 --- a/company-gtags.el +++ b/company-gtags.el @@ -67,8 +67,11 @@ completion." (cond ((not (eq company-gtags--executable 'unknown)) ;; the value is already cached company-gtags--executable) - ((and (version<= "27" emacs-version) ;; can search remotely to set - (file-remote-p default-directory)) + ((and ;; Run remotely on supported versions of Emacs. + (fboundp 'with-connection-local-variables) + (fboundp 'connection-local-set-profile-variables) + (fboundp 'connection-local-set-profiles) + (file-remote-p default-directory)) (with-connection-local-variables (if (boundp 'company-gtags--executable-connection) diff --git a/test/core-tests.el b/test/core-tests.el index 279b784..7943755 100644 --- a/test/core-tests.el +++ b/test/core-tests.el @@ -586,6 +586,10 @@ (setq header-line-format "aaaaaaa") (should (= (company--row) 0))))) +;; Avoid compilation warnings on Emacs 25. +(declare-function display-line-numbers-mode "ext:display-line-numbers") +(declare-function line-number-display-width "indent.c") + (ert-deftest company-column-with-line-numbers-display () :tags '(interactive) (skip-unless (fboundp 'display-line-numbers-mode))