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

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

[elpa] externals/company af854a1 1/2: Prefer declare-function over fboun


From: ELPA Syncer
Subject: [elpa] externals/company af854a1 1/2: Prefer declare-function over fboundp
Date: Tue, 10 Aug 2021 22:57:07 -0400 (EDT)

branch: externals/company
commit af854a1e02db8829313c4ff4568d320af3564306
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Prefer declare-function over fboundp
    
    #1164
---
 company-gtags.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/company-gtags.el b/company-gtags.el
index 7599e40..91b3121 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -63,15 +63,17 @@ completion."
             (locate-dominating-file buffer-file-name "GTAGS"))
     company-gtags--tags-available-p))
 
+;; Avoid byte-compilation warnings on Emacs < 27.
+(declare-function with-connection-local-variables "files-x")
+(declare-function connection-local-set-profile-variables "files-x")
+(declare-function connection-local-set-profiles "files-x")
+
 (defun company-gtags--executable ()
   (cond
    ((not (eq company-gtags--executable 'unknown)) ;; the value is already 
cached
     company-gtags--executable)
-   ((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))
+   ((and (version<= "27" emacs-version)           ;; can search remotely to set
+         (file-remote-p default-directory))
 
     (with-connection-local-variables
      (if (boundp 'company-gtags--executable-connection)



reply via email to

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