diff options
author | Simen Heggestøyl <simenheg@gmail.com> | 2020-05-03 19:49:55 +0200 |
---|---|---|
committer | Simen Heggestøyl <simenheg@gmail.com> | 2020-05-03 19:50:57 +0200 |
commit | 7db0093bc2c2ae3470167eb7490b69baa1904052 (patch) | |
tree | 176d3cdacbc51cd3f89adbf86a12655cdf2bfb2c /lisp/emacs-lisp/check-declare.el | |
parent | 82c506192b5ae1a454dccfae2f41fa3ee6d5e990 (diff) | |
download | emacs-7db0093bc2c2ae3470167eb7490b69baa1904052.tar.gz emacs-7db0093bc2c2ae3470167eb7490b69baa1904052.tar.bz2 emacs-7db0093bc2c2ae3470167eb7490b69baa1904052.zip |
Use lexical-binding in check-declare.el and add tests
* lisp/emacs-lisp/check-declare.el: Use lexical-binding.
(check-declare-warn): Silence byte compiler warning about unused
lexical argument.
* test/lisp/emacs-lisp/check-declare-tests.el: New file with tests
for check-declare.el.
Diffstat (limited to 'lisp/emacs-lisp/check-declare.el')
-rw-r--r-- | lisp/emacs-lisp/check-declare.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index 144385ea27c..52cda95f4c1 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -1,4 +1,4 @@ -;;; check-declare.el --- Check declare-function statements +;;; check-declare.el --- Check declare-function statements -*- lexical-binding: t; -*- ;; Copyright (C) 2007-2020 Free Software Foundation, Inc. @@ -248,7 +248,7 @@ TYPE is a string giving the nature of the error. Optional LINE is the claim's line number; otherwise, search for the claim. Display warning in `check-declare-warning-buffer'." (let ((warning-prefix-function - (lambda (level entry) + (lambda (_level entry) (insert (format "%s:%d:" (file-relative-name file) (or line 0))) entry)) (warning-fill-prefix " ")) |