emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company a5221f9 3/4: Merge pull request #1164 from yuga


From: ELPA Syncer
Subject: [elpa] externals/company a5221f9 3/4: Merge pull request #1164 from yugaego/omit-warnings
Date: Tue, 10 Aug 2021 20:57:08 -0400 (EDT)

branch: externals/company
commit a5221f9e94e33b2a31715526925162b7b012d7e9
Merge: 6b66407 05cd0bc
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: GitHub <noreply@github.com>

    Merge pull request #1164 from yugaego/omit-warnings
    
    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]