aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSimen Heggestøyl2020-05-03 19:49:55 +0200
committerSimen Heggestøyl2020-05-03 19:50:57 +0200
commit7db0093bc2c2ae3470167eb7490b69baa1904052 (patch)
tree176d3cdacbc51cd3f89adbf86a12655cdf2bfb2c /lisp
parent82c506192b5ae1a454dccfae2f41fa3ee6d5e990 (diff)
downloademacs-7db0093bc2c2ae3470167eb7490b69baa1904052.tar.gz
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')
-rw-r--r--lisp/emacs-lisp/check-declare.el4
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 @@
1;;; check-declare.el --- Check declare-function statements 1;;; check-declare.el --- Check declare-function statements -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2007-2020 Free Software Foundation, Inc. 3;; Copyright (C) 2007-2020 Free Software Foundation, Inc.
4 4
@@ -248,7 +248,7 @@ TYPE is a string giving the nature of the error.
248Optional LINE is the claim's line number; otherwise, search for the claim. 248Optional LINE is the claim's line number; otherwise, search for the claim.
249Display warning in `check-declare-warning-buffer'." 249Display warning in `check-declare-warning-buffer'."
250 (let ((warning-prefix-function 250 (let ((warning-prefix-function
251 (lambda (level entry) 251 (lambda (_level entry)
252 (insert (format "%s:%d:" (file-relative-name file) (or line 0))) 252 (insert (format "%s:%d:" (file-relative-name file) (or line 0)))
253 entry)) 253 entry))
254 (warning-fill-prefix " ")) 254 (warning-fill-prefix " "))