[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108047: Replace lexical-let by lexic
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108047: Replace lexical-let by lexical-binding (except Gnus, CEDET, ERT). |
Date: |
Thu, 26 Apr 2012 08:43:28 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 108047
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2012-04-26 08:43:28 -0400
message:
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.
modified:
lisp/ChangeLog
lisp/dired.el
lisp/doc-view.el
lisp/emacs-lisp/assoc.el
lisp/emacs-lisp/ewoc.el
lisp/emacs-lisp/syntax.el
lisp/mpc.el
lisp/progmodes/etags.el
lisp/progmodes/js.el
lisp/progmodes/pascal.el
lisp/term/ns-win.el
lisp/url/ChangeLog
lisp/url/url.el
lisp/vc/diff.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-04-26 08:43:20 +0000
+++ b/lisp/ChangeLog 2012-04-26 12:43:28 +0000
@@ -1,3 +1,16 @@
+2012-04-26 Stefan Monnier <address@hidden>
+
+
+ * term/ns-win.el (ns-define-service):
+ * progmodes/pascal.el (pascal-goto-defun):
+ * progmodes/js.el (js--read-tab):
+ * progmodes/etags.el (tags-lazy-completion-table):
+ * emacs-lisp/syntax.el (syntax-propertize-via-font-lock):
+ * emacs-lisp/ewoc.el (ewoc--wrap):
+ * emacs-lisp/assoc.el (aput, adelete, amake):
+ * doc-view.el (doc-view-convert-current-doc):
+ * vc/diff.el (diff-no-select): Replace lexical-let by lexical-binding.
+
2012-04-26 Chong Yidong <address@hidden>
* image.el (image-type-from-buffer): Only return supported image
=== modified file 'lisp/dired.el'
--- a/lisp/dired.el 2012-04-17 10:21:15 +0000
+++ b/lisp/dired.el 2012-04-26 12:43:28 +0000
@@ -670,31 +670,31 @@
;; (dolist (ext completion-ignored-extensions)
;; (if (eq ?/ (aref ext (1- (length ext)))) (push ext cie)))
;; (setq cie (concat (regexp-opt cie "\\(?:") "\\'"))
-;; (lexical-let* ((default (and buffer-file-name
-;; (abbreviate-file-name
buffer-file-name)))
-;; (cie cie)
-;; (completion-table
-;; ;; We need a mix of read-file-name and
-;; ;; read-directory-name so that completion to
directories
-;; ;; is preferred, but if the user wants to enter a
global
-;; ;; pattern, he can still use completion on
filenames to
-;; ;; help him write the pattern.
-;; ;; Essentially, we want to use
-;; ;; (completion-table-with-predicate
-;; ;; 'read-file-name-internal 'file-directory-p nil)
-;; ;; but that doesn't work because
read-file-name-internal
-;; ;; does not obey its `predicate' argument.
-;; (completion-table-in-turn
-;; (lambda (str pred action)
-;; (let ((read-file-name-predicate
-;; (lambda (f)
-;; (and (not (member f '("./" "../")))
-;; ;; Hack! Faster than
file-directory-p!
-;; (eq (aref f (1- (length f))) ?/)
-;; (not (string-match cie f))))))
-;; (complete-with-action
-;; action 'read-file-name-internal str nil)))
-;; 'read-file-name-internal)))
+;; (let* ((default (and buffer-file-name
+;; (abbreviate-file-name buffer-file-name)))
+;; (cie cie)
+;; (completion-table
+;; ;; We need a mix of read-file-name and
+;; ;; read-directory-name so that completion to directories
+;; ;; is preferred, but if the user wants to enter a global
+;; ;; pattern, he can still use completion on filenames to
+;; ;; help him write the pattern.
+;; ;; Essentially, we want to use
+;; ;; (completion-table-with-predicate
+;; ;; 'read-file-name-internal 'file-directory-p nil)
+;; ;; but that doesn't work because read-file-name-internal
+;; ;; does not obey its `predicate' argument.
+;; (completion-table-in-turn
+;; (lambda (str pred action)
+;; (let ((read-file-name-predicate
+;; (lambda (f)
+;; (and (not (member f '("./" "../")))
+;; ;; Hack! Faster than file-directory-p!
+;; (eq (aref f (1- (length f))) ?/)
+;; (not (string-match cie f))))))
+;; (complete-with-action
+;; action 'read-file-name-internal str nil)))
+;; 'read-file-name-internal)))
;; (minibuffer-with-setup-hook
;; (lambda ()
;; (setq minibuffer-default default)
=== modified file 'lisp/doc-view.el'
--- a/lisp/doc-view.el 2012-02-11 22:13:29 +0000
+++ b/lisp/doc-view.el 2012-04-26 12:43:28 +0000
@@ -960,13 +960,12 @@
(odf
;; ODF files have to be converted to PDF before Ghostscript can
;; process it.
- (lexical-let
- ((pdf (expand-file-name "doc.pdf" doc-view-current-cache-dir))
- (opdf (expand-file-name (concat (file-name-sans-extension
- (file-name-nondirectory
doc-view-buffer-file-name))
- ".pdf")
- doc-view-current-cache-dir))
- (png-file png-file))
+ (let ((pdf (expand-file-name "doc.pdf" doc-view-current-cache-dir))
+ (opdf (expand-file-name (concat (file-name-sans-extension
+ (file-name-nondirectory
doc-view-buffer-file-name))
+ ".pdf")
+ doc-view-current-cache-dir))
+ (png-file png-file))
;; The unoconv tool only supports a output directory, but no
;; file name. It's named like the input file with the
;; extension replaced by pdf.
=== modified file 'lisp/emacs-lisp/assoc.el'
--- a/lisp/emacs-lisp/assoc.el 2012-01-19 07:21:25 +0000
+++ b/lisp/emacs-lisp/assoc.el 2012-04-26 12:43:28 +0000
@@ -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 @@
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 @@
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 @@
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 @@
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
=== modified file 'lisp/emacs-lisp/ewoc.el'
--- a/lisp/emacs-lisp/ewoc.el 2012-02-28 08:17:21 +0000
+++ b/lisp/emacs-lisp/ewoc.el 2012-04-26 12:43:28 +0000
@@ -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 @@
(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")))
;;; ===========================================================================
=== modified file 'lisp/emacs-lisp/syntax.el'
--- a/lisp/emacs-lisp/syntax.el 2012-01-19 07:21:25 +0000
+++ b/lisp/emacs-lisp/syntax.el 2012-04-26 12:43:28 +0000
@@ -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 @@
"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."
=== modified file 'lisp/mpc.el'
--- a/lisp/mpc.el 2012-04-22 13:58:00 +0000
+++ b/lisp/mpc.el 2012-04-26 12:43:28 +0000
@@ -406,7 +406,7 @@
(funcall callback (prog1 (mpc-proc-buf-to-alist
(current-buffer))
(set-buffer buf))))))
- ;; (lexical-let ((res nil))
+ ;; (let ((res nil))
;; (mpc-proc-cmd-to-alist cmd (lambda (alist) (setq res alist)))
;; (mpc-proc-sync)
;; res)
=== modified file 'lisp/progmodes/etags.el'
--- a/lisp/progmodes/etags.el 2012-04-09 13:05:48 +0000
+++ b/lisp/progmodes/etags.el 2012-04-26 12:43:28 +0000
@@ -1,4 +1,4 @@
-;;; etags.el --- etags facility for Emacs
+;;; etags.el --- etags facility for Emacs -*- lexical-binding: t -*-
;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2012
;; Free Software Foundation, Inc.
@@ -781,7 +781,7 @@
(setq tags-completion-table nil)))))
(defun tags-lazy-completion-table ()
- (lexical-let ((buf (current-buffer)))
+ (let ((buf (current-buffer)))
(lambda (string pred action)
(with-current-buffer buf
(save-excursion
=== modified file 'lisp/progmodes/js.el'
--- a/lisp/progmodes/js.el 2012-01-19 07:21:25 +0000
+++ b/lisp/progmodes/js.el 2012-04-26 12:43:28 +0000
@@ -1,4 +1,4 @@
-;;; js.el --- Major mode for editing JavaScript
+;;; js.el --- Major mode for editing JavaScript -*- lexical-binding: t -*-
;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
@@ -1036,17 +1036,12 @@
(c-save-buffer-state
(open-items
- orig-match-start
- orig-match-end
- orig-depth
parse
prev-parse-point
name
case-fold-search
filtered-class-styles
- new-item
- goal-point
- end-prop)
+ goal-point)
;; Figure out which class styles we need to look for
(setq filtered-class-styles
@@ -2956,8 +2951,8 @@
(ido-mode -1))
(with-js
- (lexical-let ((tabs (js--get-tabs)) selected-tab-cname
- selected-tab prev-hitab)
+ (let ((tabs (js--get-tabs)) selected-tab-cname
+ selected-tab prev-hitab)
;; Disambiguate names
(setq tabs (loop with tab-names = (make-hash-table :test 'equal)
@@ -3053,7 +3048,6 @@
"gBrowser"
"selectedTab")
- with index = 0
for match in ido-matches
for candidate-tab = (find-tab-by-cname match)
if (eq (fourth candidate-tab) tab-to-match)
=== modified file 'lisp/progmodes/pascal.el'
--- a/lisp/progmodes/pascal.el 2012-04-09 13:05:48 +0000
+++ b/lisp/progmodes/pascal.el 2012-04-26 12:43:28 +0000
@@ -1353,21 +1353,21 @@
(default (if (pascal-comp-defun default nil 'lambda)
default ""))
(label
- ;; Do completion with default
+ ;; Do completion with default.
(completing-read (if (not (string= default ""))
(concat "Label (default " default "): ")
"Label: ")
;; Complete with the defuns found in the
;; current-buffer.
- (lexical-let ((buf (current-buffer)))
+ (let ((buf (current-buffer)))
(lambda (s p a)
(with-current-buffer buf
(pascal-comp-defun s p a))))
nil t "")))
- ;; If there was no response on prompt, use default value
+ ;; If there was no response on prompt, use default value.
(if (string= label "")
(setq label default))
- ;; Goto right place in buffer if label is not an empty string
+ ;; Goto right place in buffer if label is not an empty string.
(or (string= label "")
(progn
(goto-char (point-min))
=== modified file 'lisp/term/ns-win.el'
--- a/lisp/term/ns-win.el 2012-02-25 10:04:30 +0000
+++ b/lisp/term/ns-win.el 2012-04-26 12:43:28 +0000
@@ -1,4 +1,4 @@
-;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/MacOS X window
system
+;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/MacOS X window
system -*- lexical-binding: t -*-
;; Copyright (C) 1993-1994, 2005-2012 Free Software Foundation, Inc.
@@ -44,7 +44,7 @@
(error "%s: Loading ns-win.el but not compiled for GNUstep/MacOS"
(invocation-name)))
-(eval-when-compile (require 'cl)) ; lexical-let
+(eval-when-compile (require 'cl))
;; Documentation-purposes only: actually loaded in loadup.el.
(require 'frame)
@@ -65,7 +65,7 @@
;; nsterm.m.
(defvar ns-input-file)
-(defun ns-handle-nxopen (switch &optional temp)
+(defun ns-handle-nxopen (_switch &optional temp)
(setq unread-command-events (append unread-command-events
(if temp '(ns-open-temp-file)
'(ns-open-file)))
@@ -74,7 +74,7 @@
(defun ns-handle-nxopentemp (switch)
(ns-handle-nxopen switch t))
-(defun ns-ignore-1-arg (switch)
+(defun ns-ignore-1-arg (_switch)
(setq x-invocation-args (cdr x-invocation-args)))
(defun ns-parse-geometry (geom)
@@ -201,21 +201,20 @@
(mapconcat 'identity (cons "ns-service" path) "-")))))
;; This defines the function.
(defalias name
- (lexical-let ((service service))
- (lambda (arg)
- (interactive "p")
- (let* ((in-string
- (cond ((stringp arg) arg)
- (mark-active
- (buffer-substring (region-beginning) (region-end)))))
- (out-string (ns-perform-service service in-string)))
- (cond
- ((stringp arg) out-string)
- ((and out-string (or (not in-string)
- (not (string= in-string out-string))))
- (if mark-active (delete-region (region-beginning) (region-end)))
- (insert out-string)
- (setq deactivate-mark nil)))))))
+ (lambda (arg)
+ (interactive "p")
+ (let* ((in-string
+ (cond ((stringp arg) arg)
+ (mark-active
+ (buffer-substring (region-beginning) (region-end)))))
+ (out-string (ns-perform-service service in-string)))
+ (cond
+ ((stringp arg) out-string)
+ ((and out-string (or (not in-string)
+ (not (string= in-string out-string))))
+ (if mark-active (delete-region (region-beginning) (region-end)))
+ (insert out-string)
+ (setq deactivate-mark nil))))))
(cond
((lookup-key global-map mapping)
(while (cdr path)
=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog 2012-04-10 17:02:04 +0000
+++ b/lisp/url/ChangeLog 2012-04-26 12:43:28 +0000
@@ -1,3 +1,8 @@
+2012-04-26 Stefan Monnier <address@hidden>
+
+ * url.el (url-retrieve-synchronously): Replace lexical-let by
+ lexical-binding.
+
2012-04-10 William Xu <address@hidden> (tiny change)
* url.el (url-retrieve-internal): Hexify multibye URL string first
@@ -28,8 +33,8 @@
2012-03-11 Chong Yidong <address@hidden>
- * url-http.el (url-http-end-of-document-sentinel): Handle
- keepalive expiry by calling url-http again (Bug#10223).
+ * url-http.el (url-http-end-of-document-sentinel):
+ Handle keepalive expiry by calling url-http again (Bug#10223).
(url-http): New arg, for the above.
2012-03-11 Devon Sean McCullough <address@hidden>
@@ -180,8 +185,8 @@
2011-07-03 Lars Magne Ingebrigtsen <address@hidden>
- * url-http.el (url-http-wait-for-headers-change-function): Remove
- pointless "HTTP/0.9 How I hate thee!" message (bug#6735).
+ * url-http.el (url-http-wait-for-headers-change-function):
+ Remove pointless "HTTP/0.9 How I hate thee!" message (bug#6735).
2011-06-04 Andreas Schwab <address@hidden>
=== modified file 'lisp/url/url.el'
--- a/lisp/url/url.el 2012-04-10 11:22:08 +0000
+++ b/lisp/url/url.el 2012-04-26 12:43:28 +0000
@@ -1,4 +1,4 @@
-;;; url.el --- Uniform Resource Locator retrieval tool
+;;; url.el --- Uniform Resource Locator retrieval tool -*- lexical-binding: t
-*-
;; Copyright (C) 1996-1999, 2001, 2004-2012 Free Software Foundation, Inc.
@@ -225,8 +225,8 @@
no further processing). URL is either a string or a parsed URL."
(url-do-setup)
- (lexical-let ((retrieval-done nil)
- (asynch-buffer nil))
+ (let ((retrieval-done nil)
+ (asynch-buffer nil))
(setq asynch-buffer
(url-retrieve url (lambda (&rest ignored)
(url-debug 'retrieval "Synchronous fetching done
(%S)" (current-buffer))
=== modified file 'lisp/vc/diff.el'
--- a/lisp/vc/diff.el 2012-04-25 15:06:51 +0000
+++ b/lisp/vc/diff.el 2012-04-26 12:43:28 +0000
@@ -1,4 +1,4 @@
-;;; diff.el --- run `diff'
+;;; diff.el --- run `diff' -*- lexical-binding: t -*-
;; Copyright (C) 1992, 1994, 1996, 2001-2012 Free Software Foundation, Inc.
@@ -147,11 +147,8 @@
(buffer-enable-undo (current-buffer))
(diff-mode)
(set (make-local-variable 'revert-buffer-function)
- (lexical-let ((old old) (new new)
- (switches switches)
- (no-async no-async))
- (lambda (ignore-auto noconfirm)
- (diff-no-select old new switches no-async (current-buffer)))))
+ (lambda (_ignore-auto _noconfirm)
+ (diff-no-select old new switches no-async (current-buffer))))
(setq default-directory thisdir)
(let ((inhibit-read-only t))
(insert command "\n"))
@@ -159,12 +156,11 @@
(let ((proc (start-process "Diff" buf shell-file-name
shell-command-switch command)))
(set-process-filter proc 'diff-process-filter)
- (lexical-let ((old-alt old-alt) (new-alt new-alt))
- (set-process-sentinel
- proc (lambda (proc msg)
- (with-current-buffer (process-buffer proc)
- (diff-sentinel (process-exit-status proc)
- old-alt new-alt))))))
+ (set-process-sentinel
+ proc (lambda (proc _msg)
+ (with-current-buffer (process-buffer proc)
+ (diff-sentinel (process-exit-status proc)
+ old-alt new-alt)))))
;; Async processes aren't available.
(let ((inhibit-read-only t))
(diff-sentinel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108047: Replace lexical-let by lexical-binding (except Gnus, CEDET, ERT).,
Stefan Monnier <=