summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-04-26 08:43:28 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-04-26 08:43:28 -0400
commite95a67dc75c3d41c428d6e215426f321b5a2f9e5 (patch)
tree942041f2385c9506f52b6c97af7e4cee34f917db /lisp/emacs-lisp
parent4c3fa1d9adf3dca80e86b45488b0556f5f0fa495 (diff)
downloademacs-e95a67dc75c3d41c428d6e215426f321b5a2f9e5.tar.gz
emacs-e95a67dc75c3d41c428d6e215426f321b5a2f9e5.tar.bz2
emacs-e95a67dc75c3d41c428d6e215426f321b5a2f9e5.zip
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/assoc.el18
-rw-r--r--lisp/emacs-lisp/ewoc.el9
-rw-r--r--lisp/emacs-lisp/syntax.el15
3 files changed, 20 insertions, 22 deletions
diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el
index 264374ed721..d3185c444d7 100644
--- a/lisp/emacs-lisp/assoc.el
+++ b/lisp/emacs-lisp/assoc.el
@@ -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
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index 4fd87209b38..9e214a9703c 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -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")))
;;; ===========================================================================
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 611a766922a..583d0b151c9 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -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."