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

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

[elpa] externals/company f64f73e9ef: Fix a bunch of warnings related to


From: ELPA Syncer
Subject: [elpa] externals/company f64f73e9ef: Fix a bunch of warnings related to lexical-binding
Date: Mon, 6 Nov 2023 15:57:30 -0500 (EST)

branch: externals/company
commit f64f73e9efd3f9ef30fe6868816086c2794616a1
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    Fix a bunch of warnings related to lexical-binding
    
    Or its absence.
---
 company-abbrev.el    |  8 ++++----
 company-bbdb.el      |  8 ++++----
 company-cmake.el     | 10 ++++------
 company-etags.el     |  6 +++---
 company-files.el     |  8 ++++----
 company-gtags.el     |  9 ++++-----
 company-ispell.el    |  4 ++--
 company-keywords.el  |  6 +++---
 company-nxml.el      | 15 +++++++--------
 company-oddmuse.el   |  6 +++---
 company-semantic.el  |  6 +++---
 company-template.el  |  4 ++--
 company-tempo.el     |  6 +++---
 company-tng.el       |  4 ++--
 company-yasnippet.el |  6 +++---
 test/elisp-tests.el  |  4 ++--
 16 files changed, 53 insertions(+), 57 deletions(-)

diff --git a/company-abbrev.el b/company-abbrev.el
index b8f81c47dd..74677f46ed 100644
--- a/company-abbrev.el
+++ b/company-abbrev.el
@@ -1,6 +1,6 @@
-;;; company-abbrev.el --- company-mode completion backend for abbrev
+;;; company-abbrev.el --- company-mode completion backend for abbrev  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2015, 2021  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2015, 2021, 2023  Free Software Foundation, 
Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -29,12 +29,12 @@
 (require 'cl-lib)
 (require 'abbrev)
 
-(defun company-abbrev-insert (match)
+(defun company-abbrev-insert (_match)
   "Replace MATCH with the expanded abbrev."
   (expand-abbrev))
 
 ;;;###autoload
-(defun company-abbrev (command &optional arg &rest ignored)
+(defun company-abbrev (command &optional arg &rest _ignored)
   "`company-mode' completion backend for abbrev."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-bbdb.el b/company-bbdb.el
index 1016e2aa29..ce5ec19007 100644
--- a/company-bbdb.el
+++ b/company-bbdb.el
@@ -1,6 +1,6 @@
-;;; company-bbdb.el --- company-mode completion backend for BBDB in 
message-mode
+;;; company-bbdb.el --- company-mode completion backend for BBDB in 
message-mode  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2013-2016, 2020  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016, 2020, 2023  Free Software Foundation, Inc.
 
 ;; Author: Jan Tatarik <jan.tatarik@gmail.com>
 
@@ -36,14 +36,14 @@
   :type '(repeat (symbol :tag "Major mode"))
   :package-version '(company . "0.8.8"))
 
-(defun company-bbdb--candidates (arg)
+(defun company-bbdb--candidates (_arg)
   (cl-mapcan (lambda (record)
                (mapcar (lambda (mail) (bbdb-dwim-mail record mail))
                        (bbdb-record-get-field record 'mail)))
              (eval '(bbdb-search (bbdb-records) arg nil arg))))
 
 ;;;###autoload
-(defun company-bbdb (command &optional arg &rest ignore)
+(defun company-bbdb (command &optional arg &rest _ignore)
   "`company-mode' completion backend for BBDB."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-cmake.el b/company-cmake.el
index a072be1f7c..bf78615a09 100644
--- a/company-cmake.el
+++ b/company-cmake.el
@@ -1,6 +1,6 @@
-;;; company-cmake.el --- company-mode completion backend for CMake
+;;; company-cmake.el --- company-mode completion backend for CMake  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2013-2015, 2017-2018, 2020  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015, 2017-2018, 2020, 2023  Free Software Foundation, 
Inc.
 
 ;; Author: Chen Bin <chenbin DOT sh AT gmail>
 ;; Version: 0.2
@@ -94,12 +94,10 @@ They affect which types of symbols we get completion 
candidates for.")
     ))
 
 (defun company-cmake--parse (prefix content cmd)
-  (let ((start 0)
-        (pattern (format company-cmake--completion-pattern
+  (let ((pattern (format company-cmake--completion-pattern
                          (regexp-quote prefix)
                          (if (zerop (length prefix)) "+" "*")))
         (lines (split-string content "\n"))
-        match
         rlt)
     (dolist (line lines)
       (when (string-match pattern line)
@@ -185,7 +183,7 @@ They affect which types of symbols we get completion 
candidates for.")
     (and (eq (char-before (point)) ?\{)
          (eq (char-before (1- (point))) ?$))))
 
-(defun company-cmake (command &optional arg &rest ignored)
+(defun company-cmake (command &optional arg &rest _ignored)
   "`company-mode' completion backend for CMake.
 CMake is a cross-platform, open-source make system."
   (interactive (list 'interactive))
diff --git a/company-etags.el b/company-etags.el
index 0bd093aa05..ed68a75c30 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -1,6 +1,6 @@
-;;; company-etags.el --- company-mode completion backend for etags
+;;; company-etags.el --- company-mode completion backend for etags  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2015, 2018-2019  Free Software Foundation, 
Inc.
+;; Copyright (C) 2009-2011, 2013-2015, 2018-2019, 2023  Free Software 
Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -85,7 +85,7 @@ Set it to t or to a list of major modes."
            (all-completions prefix (tags-completion-table))))))
 
 ;;;###autoload
-(defun company-etags (command &optional arg &rest ignored)
+(defun company-etags (command &optional arg &rest _ignored)
   "`company-mode' completion backend for etags."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-files.el b/company-files.el
index 0eb6cfe498..99e99c67e9 100644
--- a/company-files.el
+++ b/company-files.el
@@ -1,6 +1,6 @@
-;;; company-files.el --- company-mode completion backend for file names
+;;; company-files.el --- company-mode completion backend for file names  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2021, 2023  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -48,7 +48,7 @@ Set this to nil to disable that behavior."
 
 (defun company-files--directory-files (dir prefix)
   ;; Don't use directory-files. It produces directories without trailing /.
-  (condition-case err
+  (condition-case _err
       (let ((comp (sort (file-name-all-completions prefix dir)
                         (lambda (s1 s2) (string-lessp (downcase s1) (downcase 
s2))))))
         (when company-files-exclusions
@@ -141,7 +141,7 @@ Set this to nil to disable that behavior."
     (delete-char -1)))
 
 ;;;###autoload
-(defun company-files (command &optional arg &rest ignored)
+(defun company-files (command &optional arg &rest _ignored)
   "`company-mode' completion backend existing file names.
 Completions works for proper absolute and relative files paths.
 File paths with spaces are only supported inside strings."
diff --git a/company-gtags.el b/company-gtags.el
index 8c08c83ac5..3790855cf6 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -1,6 +1,6 @@
-;;; company-gtags.el --- company-mode completion backend for GNU Global
+;;; company-gtags.el --- company-mode completion backend for GNU Global  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2021, 2023  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -97,7 +97,6 @@ completion."
 
 (defun company-gtags--fetch-tags (prefix)
   (with-temp-buffer
-    (let (tags)
       ;; For some reason Global v 6.6.3 is prone to returning exit status 1
       ;; even on successful searches when '-T' is used.
       (when (/= 3 (process-file (company-gtags--executable) nil
@@ -118,7 +117,7 @@ completion."
                              'meta (match-string 4)
                              'location (cons (expand-file-name (match-string 
3))
                                              (string-to-number (match-string 
2)))
-                             ))))))
+                             )))))
 
 (defun company-gtags--annotation (arg)
   (let ((meta (get-text-property 0 'meta arg)))
@@ -135,7 +134,7 @@ completion."
            start (point)))))))
 
 ;;;###autoload
-(defun company-gtags (command &optional arg &rest ignored)
+(defun company-gtags (command &optional arg &rest _ignored)
   "`company-mode' completion backend for GNU Global."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-ispell.el b/company-ispell.el
index b4a9ca1539..a777431597 100644
--- a/company-ispell.el
+++ b/company-ispell.el
@@ -1,4 +1,4 @@
-;;; company-ispell.el --- company-mode completion backend using Ispell
+;;; company-ispell.el --- company-mode completion backend using Ispell  -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2009-2011, 2013-2016, 2018, 2021, 2023  Free Software 
Foundation, Inc.
 
@@ -63,7 +63,7 @@ If nil, use `ispell-complete-word-dict'."
       ispell-alternate-dictionary))
 
 ;;;###autoload
-(defun company-ispell (command &optional arg &rest ignored)
+(defun company-ispell (command &optional arg &rest _ignored)
   "`company-mode' completion backend using Ispell."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-keywords.el b/company-keywords.el
index 57ec28d692..c10eaa921b 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -1,6 +1,6 @@
-;;; company-keywords.el --- A company backend for programming language keywords
+;;; company-keywords.el --- A company backend for programming language 
keywords  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2018, 2020-2022  Free Software Foundation, 
Inc.
+;; Copyright (C) 2009-2011, 2013-2018, 2020-2023  Free Software Foundation, 
Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -439,7 +439,7 @@
      (makefile-mode          . makefile-statements))))
 
 ;;;###autoload
-(defun company-keywords (command &optional arg &rest ignored)
+(defun company-keywords (command &optional arg &rest _ignored)
   "`company-mode' backend for programming language keywords."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-nxml.el b/company-nxml.el
index c72685c0ab..2a77e36774 100644
--- a/company-nxml.el
+++ b/company-nxml.el
@@ -1,6 +1,6 @@
-;;; company-nxml.el --- company-mode completion backend for nxml-mode
+;;; company-nxml.el --- company-mode completion backend for nxml-mode  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2015, 2017-2018  Free Software Foundation, 
Inc.
+;; Copyright (C) 2009-2011, 2013-2015, 2017-2018, 2023  Free Software 
Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -71,12 +71,11 @@
 
 (defmacro company-nxml-prepared (&rest body)
   (declare (indent 0) (debug t))
-  `(let ((lt-pos (save-excursion (search-backward "<" nil t)))
-         xmltok-dtd)
+  `(let ((lt-pos (save-excursion (search-backward "<" nil t))))
      (when (and lt-pos (= (rng-set-state-after lt-pos) lt-pos))
        ,@body)))
 
-(defun company-nxml-tag (command &optional arg &rest ignored)
+(defun company-nxml-tag (command &optional arg &rest _ignored)
   (cl-case command
     (prefix (and (derived-mode-p 'nxml-mode)
                  rng-validate-mode
@@ -86,7 +85,7 @@
                   arg (rng-match-possible-start-tag-names))))
     (sorted t)))
 
-(defun company-nxml-attribute (command &optional arg &rest ignored)
+(defun company-nxml-attribute (command &optional arg &rest _ignored)
   (cl-case command
     (prefix (and (derived-mode-p 'nxml-mode)
                  rng-validate-mode
@@ -99,7 +98,7 @@
                        arg (rng-match-possible-attribute-names)))))
     (sorted t)))
 
-(defun company-nxml-attribute-value (command &optional arg &rest ignored)
+(defun company-nxml-attribute-value (command &optional arg &rest _ignored)
   (cl-case command
     (prefix (and (derived-mode-p 'nxml-mode)
                  rng-validate-mode
@@ -121,7 +120,7 @@
                          arg (rng-match-possible-value-strings))))))))
 
 ;;;###autoload
-(defun company-nxml (command &optional arg &rest ignored)
+(defun company-nxml (command &optional arg &rest _ignored)
   "`company-mode' completion backend for `nxml-mode'."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-oddmuse.el b/company-oddmuse.el
index 78ede68bd9..fd0b256355 100644
--- a/company-oddmuse.el
+++ b/company-oddmuse.el
@@ -1,6 +1,6 @@
-;;; company-oddmuse.el --- company-mode completion backend for oddmuse-mode
+;;; company-oddmuse.el --- company-mode completion backend for oddmuse-mode  
-*- lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2016, 2022  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2016, 2022, 2023  Free Software Foundation, 
Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -41,7 +41,7 @@
                     (oddmuse-make-completion-table oddmuse-wiki)))))
 
 ;;;###autoload
-(defun company-oddmuse (command &optional arg &rest ignored)
+(defun company-oddmuse (command &optional arg &rest _ignored)
   "`company-mode' completion backend for `oddmuse-mode'."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-semantic.el b/company-semantic.el
index cd567646e2..53b11c0320 100644
--- a/company-semantic.el
+++ b/company-semantic.el
@@ -1,6 +1,6 @@
-;;; company-semantic.el --- company-mode completion backend using Semantic
+;;; company-semantic.el --- company-mode completion backend using Semantic  
-*- lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2018  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2018, 2023  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -130,7 +130,7 @@ and `c-electric-colon', for automatic completion right 
after \">\" and
     (company-grab-symbol)))
 
 ;;;###autoload
-(defun company-semantic (command &optional arg &rest ignored)
+(defun company-semantic (command &optional arg &rest _ignored)
   "`company-mode' completion backend using CEDET Semantic."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-template.el b/company-template.el
index 57d5d48874..65fbf6e8bb 100644
--- a/company-template.el
+++ b/company-template.el
@@ -1,6 +1,6 @@
-;;; company-template.el --- utility library for template expansion
+;;; company-template.el --- utility library for template expansion  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009-2010, 2013-2017, 2019  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2010, 2013-2017, 2019, 2023  Free Software Foundation, 
Inc.
 
 ;; Author: Nikolaj Schumacher
 
diff --git a/company-tempo.el b/company-tempo.el
index 639de95c7a..6126033946 100644
--- a/company-tempo.el
+++ b/company-tempo.el
@@ -1,6 +1,6 @@
-;;; company-tempo.el --- company-mode completion backend for tempo
+;;; company-tempo.el --- company-mode completion backend for tempo  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2009-2011, 2013-2016  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013-2016, 2023  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -56,7 +56,7 @@
          (car (split-string doc "\n" t)))))
 
 ;;;###autoload
-(defun company-tempo (command &optional arg &rest ignored)
+(defun company-tempo (command &optional arg &rest _ignored)
   "`company-mode' completion backend for tempo."
   (interactive (list 'interactive))
   (cl-case command
diff --git a/company-tng.el b/company-tng.el
index bee6746a99..fe7cd95bb1 100644
--- a/company-tng.el
+++ b/company-tng.el
@@ -1,6 +1,6 @@
-;;; company-tng.el --- company-mode configuration for single-button interaction
+;;; company-tng.el --- company-mode configuration for single-button 
interaction  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2017-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2017-2021, 2023  Free Software Foundation, Inc.
 
 ;; Author: Nikita Leshenko
 
diff --git a/company-yasnippet.el b/company-yasnippet.el
index fb6767427e..d2f56b628c 100644
--- a/company-yasnippet.el
+++ b/company-yasnippet.el
@@ -1,6 +1,6 @@
-;;; company-yasnippet.el --- company-mode completion backend for Yasnippet
+;;; company-yasnippet.el --- company-mode completion backend for Yasnippet  
-*- lexical-binding: t -*-
 
-;; Copyright (C) 2014-2015, 2020-2022  Free Software Foundation, Inc.
+;; Copyright (C) 2014-2015, 2020-2023  Free Software Foundation, Inc.
 
 ;; Author: Dmitry Gutov
 
@@ -136,7 +136,7 @@ It has to accept one argument: the snippet's name.")
       (current-buffer))))
 
 ;;;###autoload
-(defun company-yasnippet (command &optional arg &rest ignore)
+(defun company-yasnippet (command &optional arg &rest _ignore)
   "`company-mode' backend for `yasnippet'.
 
 This backend should be used with care, because as long as there are
diff --git a/test/elisp-tests.el b/test/elisp-tests.el
index 5cc9181320..4aa87e11b3 100644
--- a/test/elisp-tests.el
+++ b/test/elisp-tests.el
@@ -1,6 +1,6 @@
-;;; elisp-tests.el --- company-elisp tests
+;;; elisp-tests.el --- company-elisp tests  -*- lexical-binding: nil -*-
 
-;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015, 2023  Free Software Foundation, Inc.
 
 ;; Author: Dmitry Gutov
 



reply via email to

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