summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-02-17 18:52:12 -0500
committerMark Oteiza <mvoteiza@udel.edu>2017-02-17 18:52:12 -0500
commitedadd31bf4b5516acf3d041f79cf7164c584e052 (patch)
tree106c829eec6d2a1748f2dc8d059cbfd5d16ee158 /lisp/emacs-lisp
parent5401820672c650f47bf055ebbf3cc590f90cb05a (diff)
downloademacs-edadd31bf4b5516acf3d041f79cf7164c584e052.tar.gz
emacs-edadd31bf4b5516acf3d041f79cf7164c584e052.tar.bz2
emacs-edadd31bf4b5516acf3d041f79cf7164c584e052.zip
Turn on lexical-binding in elint.el
* lisp/emacs-lisp/elint.el: Quote entry point commands in commentary. (elint-running, elint-current-pos): Move these dynamic vars to toward the top of the file. (elint-check-quote-form): Ignore unused argument. (elint-check-conditional-form): Remove unused binding.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/elint.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index f5e10a24d37..a14bd0d7643 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -1,4 +1,4 @@
-;;; elint.el --- Lint Emacs Lisp
+;;; elint.el --- Lint Emacs Lisp -*- lexical-binding: t -*-
;; Copyright (C) 1997, 2001-2017 Free Software Foundation, Inc.
@@ -27,7 +27,7 @@
;; misspellings and undefined variables, although it can also catch
;; function calls with the wrong number of arguments.
-;; To use, call elint-current-buffer or elint-defun to lint a buffer
+;; To use, call `elint-current-buffer' or `elint-defun' to lint a buffer
;; or defun. The first call runs `elint-initialize' to set up some
;; argument data, which may take a while.
@@ -154,6 +154,9 @@ Set by `elint-initialize', if `elint-scan-preloaded' is non-nil.")
"Regexp matching elements of `preloaded-file-list' to ignore.
We ignore them because they contain no definitions of use to Elint.")
+(defvar elint-running)
+(defvar elint-current-pos) ; dynamically bound in elint-top-form
+
;;;
;;; ADT: top-form
;;;
@@ -862,7 +865,7 @@ CODE can be a lambda expression, a macro, or byte-compiled code."
(t (elint-error "Not a function object: %s" form)
env))))
-(defun elint-check-quote-form (form env)
+(defun elint-check-quote-form (_form env)
"Lint the quote FORM in ENV."
env)
@@ -903,8 +906,7 @@ CODE can be a lambda expression, a macro, or byte-compiled code."
"Check the when/unless/and/or FORM in ENV.
Does basic handling of `featurep' tests."
(let ((func (car form))
- (test (cadr form))
- sym)
+ (test (cadr form)))
;; Misses things like (and t (featurep 'xemacs))
;; Check byte-compile-maybe-guarded.
(cond ((and (memq func '(when and))
@@ -967,8 +969,6 @@ Does basic handling of `featurep' tests."
;;; Message functions
;;;
-(defvar elint-current-pos) ; dynamically bound in elint-top-form
-
(defun elint-log (type string args)
(elint-log-message (format "%s:%d:%s: %s"
(let ((f (buffer-file-name)))
@@ -1038,8 +1038,6 @@ Insert HEADER followed by a blank line if non-nil."
(display-buffer (elint-get-log-buffer))
(sit-for 0)))
-(defvar elint-running)
-
(defun elint-set-mode-line (&optional on)
"Set the mode-line-process of the Elint log buffer."
(with-current-buffer (elint-get-log-buffer)