Replace lexical-let by lexical-binding (except Gnus, CEDET, ERT).
* lisp/term/ns-win.el (ns-define-service): * lisp/progmodes/pascal.el (pascal-goto-defun): * lisp/progmodes/js.el (js--read-tab): * lisp/progmodes/etags.el (tags-lazy-completion-table): * lisp/emacs-lisp/syntax.el (syntax-propertize-via-font-lock): * lisp/emacs-lisp/ewoc.el (ewoc--wrap): * lisp/emacs-lisp/assoc.el (aput, adelete, amake): * lisp/doc-view.el (doc-view-convert-current-doc): * lisp/url/url.el (url-retrieve-synchronously): * lisp/vc/diff.el (diff-no-select): Replace lexical-let by lexical-binding.
This commit is contained in:
parent
4c3fa1d9ad
commit
e95a67dc75
14 changed files with 113 additions and 109 deletions
|
@ -1,4 +1,4 @@
|
|||
;;; assoc.el --- insert/delete functions on association lists
|
||||
;;; assoc.el --- insert/delete functions on association lists -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 1996, 2001-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -36,7 +36,7 @@ the order of any other key-value pair. Side effect sets alist to new
|
|||
sorted list."
|
||||
(set alist-symbol
|
||||
(sort (copy-alist (symbol-value alist-symbol))
|
||||
(function (lambda (a b) (equal (car a) key))))))
|
||||
(lambda (a _b) (equal (car a) key)))))
|
||||
|
||||
|
||||
(defun aelement (key value)
|
||||
|
@ -71,8 +71,8 @@ If VALUE is not supplied, or is nil, the key-value pair will not be
|
|||
modified, but will be moved to the head of the alist. If the key-value
|
||||
pair cannot be found in the alist, it will be inserted into the head
|
||||
of the alist (with value nil if VALUE is nil or not supplied)."
|
||||
(lexical-let ((elem (aelement key value))
|
||||
alist)
|
||||
(let ((elem (aelement key value))
|
||||
alist)
|
||||
(asort alist-symbol key)
|
||||
(setq alist (symbol-value alist-symbol))
|
||||
(cond ((null alist) (set alist-symbol elem))
|
||||
|
@ -86,7 +86,7 @@ of the alist (with value nil if VALUE is nil or not supplied)."
|
|||
Alist is referenced by ALIST-SYMBOL and the key-value pair to remove
|
||||
is pair matching KEY. Returns the altered alist."
|
||||
(asort alist-symbol key)
|
||||
(lexical-let ((alist (symbol-value alist-symbol)))
|
||||
(let ((alist (symbol-value alist-symbol)))
|
||||
(cond ((null alist) nil)
|
||||
((anot-head-p alist key) alist)
|
||||
(t (set alist-symbol (cdr alist))))))
|
||||
|
@ -123,10 +123,10 @@ KEYLIST and VALUELIST should have the same number of elements, but
|
|||
this isn't enforced. If VALUELIST is smaller than KEYLIST, remaining
|
||||
keys are associated with nil. If VALUELIST is larger than KEYLIST,
|
||||
extra values are ignored. Returns the created alist."
|
||||
(lexical-let ((keycar (car keylist))
|
||||
(keycdr (cdr keylist))
|
||||
(valcar (car valuelist))
|
||||
(valcdr (cdr valuelist)))
|
||||
(let ((keycar (car keylist))
|
||||
(keycdr (cdr keylist))
|
||||
(valcar (car valuelist))
|
||||
(valcdr (cdr valuelist)))
|
||||
(cond ((null keycdr)
|
||||
(aput alist-symbol keycar valcar))
|
||||
(t
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer
|
||||
;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 1991-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -216,10 +216,9 @@ NODE and leaving the new node's start there. Return the new node."
|
|||
(ewoc--adjust m (point) R dll)))
|
||||
|
||||
(defun ewoc--wrap (func)
|
||||
(lexical-let ((ewoc--user-pp func))
|
||||
(lambda (data)
|
||||
(funcall ewoc--user-pp data)
|
||||
(insert "\n"))))
|
||||
(lambda (data)
|
||||
(funcall func data)
|
||||
(insert "\n")))
|
||||
|
||||
|
||||
;;; ===========================================================================
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; syntax.el --- helper functions to find syntactic context
|
||||
;;; syntax.el --- helper functions to find syntactic context -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -274,13 +274,12 @@ Note: back-references in REGEXPs do not work."
|
|||
"Propertize for syntax in START..END using font-lock syntax.
|
||||
KEYWORDS obeys the format used in `font-lock-syntactic-keywords'.
|
||||
The return value is a function suitable for `syntax-propertize-function'."
|
||||
(lexical-let ((keywords keywords))
|
||||
(lambda (start end)
|
||||
(with-no-warnings
|
||||
(let ((font-lock-syntactic-keywords keywords))
|
||||
(font-lock-fontify-syntactic-keywords-region start end)
|
||||
;; In case it was eval'd/compiled.
|
||||
(setq keywords font-lock-syntactic-keywords))))))
|
||||
(lambda (start end)
|
||||
(with-no-warnings
|
||||
(let ((font-lock-syntactic-keywords keywords))
|
||||
(font-lock-fontify-syntactic-keywords-region start end)
|
||||
;; In case it was eval'd/compiled.
|
||||
(setq keywords font-lock-syntactic-keywords)))))
|
||||
|
||||
(defun syntax-propertize (pos)
|
||||
"Ensure that syntax-table properties are set until POS."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue