-;;; elint.el --- Lint Emacs Lisp
+;;; elint.el --- Lint Emacs Lisp -*- lexical-binding: t -*-
;; Copyright (C) 1997, 2001-2017 Free Software Foundation, Inc.
;; 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.
"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
;;;
(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)
"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))
;;; 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)))
(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)