[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master edadd31: Turn on lexical-binding in elint.el
From: |
Mark Oteiza |
Subject: |
[Emacs-diffs] master edadd31: Turn on lexical-binding in elint.el |
Date: |
Fri, 17 Feb 2017 18:54:05 -0500 (EST) |
branch: master
commit edadd31bf4b5516acf3d041f79cf7164c584e052
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>
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.
---
lisp/emacs-lisp/elint.el | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index f5e10a2..a14bd0d 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master edadd31: Turn on lexical-binding in elint.el,
Mark Oteiza <=