diff options
| author | Mark Oteiza | 2016-09-28 13:08:12 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2016-09-28 13:08:12 -0400 |
| commit | cbb2e845187bfbcc62e2accc9df7891a2326608a (patch) | |
| tree | 1fc3cc9a58e0646119d81cc70663dda7454f867a | |
| parent | 329e0274ec6a4ae82f86905b8cf844971b943085 (diff) | |
| download | emacs-cbb2e845187bfbcc62e2accc9df7891a2326608a.tar.gz emacs-cbb2e845187bfbcc62e2accc9df7891a2326608a.zip | |
Turn on more lexical-binding
* lisp/dom.el:
* lisp/faces.el:
* lisp/htmlfontify.el: Turn on lexical-binding.
(htmlfontify-string): Use pushnew instead of add-to-list.
* lisp/info-xref.el:
* lisp/isearch.el:
* lisp/man.el:
* lisp/ps-def.el:
* lisp/ps-print.el:
* lisp/replace.el: Turn on lexical-binding. Require cl-lib at compile
time.
(multi-occur): Use cl-pushnew instead of add-to-list.
(replace-match-string-symbols): Remove unused lexical variable.
(replace-search, replace-highlight): Fix argument shadowing.
* lisp/sort.el:
* lisp/xml.el: Turn on lexical-binding.
(xml--parse-buffer): Use push instead of add-to-list.
* lisp/xt-mouse.el: Turn on lexical-binding.
| -rw-r--r-- | lisp/dom.el | 2 | ||||
| -rw-r--r-- | lisp/faces.el | 2 | ||||
| -rw-r--r-- | lisp/htmlfontify.el | 5 | ||||
| -rw-r--r-- | lisp/info-xref.el | 2 | ||||
| -rw-r--r-- | lisp/isearch.el | 2 | ||||
| -rw-r--r-- | lisp/man.el | 2 | ||||
| -rw-r--r-- | lisp/ps-def.el | 2 | ||||
| -rw-r--r-- | lisp/ps-print.el | 2 | ||||
| -rw-r--r-- | lisp/replace.el | 15 | ||||
| -rw-r--r-- | lisp/sort.el | 2 | ||||
| -rw-r--r-- | lisp/xml.el | 6 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 2 |
12 files changed, 22 insertions, 22 deletions
diff --git a/lisp/dom.el b/lisp/dom.el index cf3a02a51db..9f5e177e986 100644 --- a/lisp/dom.el +++ b/lisp/dom.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; dom.el --- XML/HTML (etc.) DOM manipulation and searching functions | 1 | ;;; dom.el --- XML/HTML (etc.) DOM manipulation and searching functions -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2014-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2014-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/faces.el b/lisp/faces.el index a7c4cce741f..15090e1f94a 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; faces.el --- Lisp faces | 1 | ;;; faces.el --- Lisp faces -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992-1996, 1998-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992-1996, 1998-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 8cbe3c1dc9e..52bc36e3606 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; htmlfontify.el --- htmlize a buffer/source tree with optional hyperlinks | 1 | ;;; htmlfontify.el --- htmlize a buffer/source tree with optional hyperlinks -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002-2003, 2009-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002-2003, 2009-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -1805,8 +1805,7 @@ It is assumed that STRING has text properties that allow it to be | |||
| 1805 | fontified. This is a simple convenience wrapper around | 1805 | fontified. This is a simple convenience wrapper around |
| 1806 | `htmlfontify-buffer'." | 1806 | `htmlfontify-buffer'." |
| 1807 | (let* ((hfy-optimizations-1 (copy-sequence hfy-optimizations)) | 1807 | (let* ((hfy-optimizations-1 (copy-sequence hfy-optimizations)) |
| 1808 | (hfy-optimizations (add-to-list 'hfy-optimizations-1 | 1808 | (hfy-optimizations (pushnew 'skip-refontification hfy-optimizations-1))) |
| 1809 | 'skip-refontification))) | ||
| 1810 | (with-temp-buffer | 1809 | (with-temp-buffer |
| 1811 | (insert string) | 1810 | (insert string) |
| 1812 | (htmlfontify-buffer) | 1811 | (htmlfontify-buffer) |
diff --git a/lisp/info-xref.el b/lisp/info-xref.el index cafc0e4b06a..81a2a5a0167 100644 --- a/lisp/info-xref.el +++ b/lisp/info-xref.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; info-xref.el --- check external references in an Info document | 1 | ;;; info-xref.el --- check external references in an Info document -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/isearch.el b/lisp/isearch.el index 39ed8af3702..ce87d1bac3c 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; isearch.el --- incremental search minor mode | 1 | ;;; isearch.el --- incremental search minor mode -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992-1997, 1999-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992-1997, 1999-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/man.el b/lisp/man.el index d127decfebd..0f3c4ba98e8 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; man.el --- browse UNIX manual pages | 1 | ;;; man.el --- browse UNIX manual pages -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1994, 1996-1997, 2001-2016 Free Software | 3 | ;; Copyright (C) 1993-1994, 1996-1997, 2001-2016 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 60016285e7c..fbb61b53e73 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; ps-def.el --- XEmacs and Emacs definitions for ps-print | 1 | ;;; ps-def.el --- XEmacs and Emacs definitions for ps-print -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 54ffe2874df..6c2a8c6161a 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; ps-print.el --- print text from the buffer as PostScript | 1 | ;;; ps-print.el --- print text from the buffer as PostScript -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/replace.el b/lisp/replace.el index e6124f44c9f..42567516e47 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; replace.el --- replace commands for Emacs | 1 | ;;; replace.el --- replace commands for Emacs -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2016 Free | 3 | ;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2016 Free |
| 4 | ;; Software Foundation, Inc. | 4 | ;; Software Foundation, Inc. |
| @@ -28,6 +28,8 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (eval-when-compile (require 'cl-lib)) | ||
| 32 | |||
| 31 | (defcustom case-replace t | 33 | (defcustom case-replace t |
| 32 | "Non-nil means `query-replace' should preserve case in replacements." | 34 | "Non-nil means `query-replace' should preserve case in replacements." |
| 33 | :type 'boolean | 35 | :type 'boolean |
| @@ -1408,7 +1410,7 @@ See also `multi-occur-in-matching-buffers'." | |||
| 1408 | "Next buffer to search (RET to end): ") | 1410 | "Next buffer to search (RET to end): ") |
| 1409 | nil t)) | 1411 | nil t)) |
| 1410 | "")) | 1412 | "")) |
| 1411 | (add-to-list 'bufs buf) | 1413 | (cl-pushnew buf bufs) |
| 1412 | (setq ido-ignore-item-temp-list bufs)) | 1414 | (setq ido-ignore-item-temp-list bufs)) |
| 1413 | (nreverse (mapcar #'get-buffer bufs))) | 1415 | (nreverse (mapcar #'get-buffer bufs))) |
| 1414 | (occur-read-primary-args))) | 1416 | (occur-read-primary-args))) |
| @@ -1945,7 +1947,6 @@ type them using Lisp syntax." | |||
| 1945 | 1947 | ||
| 1946 | (defun replace-eval-replacement (expression count) | 1948 | (defun replace-eval-replacement (expression count) |
| 1947 | (let* ((replace-count count) | 1949 | (let* ((replace-count count) |
| 1948 | err | ||
| 1949 | (replacement | 1950 | (replacement |
| 1950 | (condition-case err | 1951 | (condition-case err |
| 1951 | (eval expression) | 1952 | (eval expression) |
| @@ -2046,7 +2047,7 @@ It is called with three arguments, as if it were | |||
| 2046 | `re-search-forward'.") | 2047 | `re-search-forward'.") |
| 2047 | 2048 | ||
| 2048 | (defun replace-search (search-string limit regexp-flag delimited-flag | 2049 | (defun replace-search (search-string limit regexp-flag delimited-flag |
| 2049 | case-fold-search &optional backward) | 2050 | case-fold &optional backward) |
| 2050 | "Search for the next occurrence of SEARCH-STRING to replace." | 2051 | "Search for the next occurrence of SEARCH-STRING to replace." |
| 2051 | ;; Let-bind global isearch-* variables to values used | 2052 | ;; Let-bind global isearch-* variables to values used |
| 2052 | ;; to search the next replacement. These let-bindings | 2053 | ;; to search the next replacement. These let-bindings |
| @@ -2065,7 +2066,7 @@ It is called with three arguments, as if it were | |||
| 2065 | replace-lax-whitespace) | 2066 | replace-lax-whitespace) |
| 2066 | (isearch-regexp-lax-whitespace | 2067 | (isearch-regexp-lax-whitespace |
| 2067 | replace-regexp-lax-whitespace) | 2068 | replace-regexp-lax-whitespace) |
| 2068 | (isearch-case-fold-search case-fold-search) | 2069 | (isearch-case-fold-search case-fold) |
| 2069 | (isearch-adjusted nil) | 2070 | (isearch-adjusted nil) |
| 2070 | (isearch-nonincremental t) ; don't use lax word mode | 2071 | (isearch-nonincremental t) ; don't use lax word mode |
| 2071 | (isearch-forward (not backward)) | 2072 | (isearch-forward (not backward)) |
| @@ -2080,7 +2081,7 @@ It is called with three arguments, as if it were | |||
| 2080 | 2081 | ||
| 2081 | (defun replace-highlight (match-beg match-end range-beg range-end | 2082 | (defun replace-highlight (match-beg match-end range-beg range-end |
| 2082 | search-string regexp-flag delimited-flag | 2083 | search-string regexp-flag delimited-flag |
| 2083 | case-fold-search &optional backward) | 2084 | case-fold &optional backward) |
| 2084 | (if query-replace-highlight | 2085 | (if query-replace-highlight |
| 2085 | (if replace-overlay | 2086 | (if replace-overlay |
| 2086 | (move-overlay replace-overlay match-beg match-end (current-buffer)) | 2087 | (move-overlay replace-overlay match-beg match-end (current-buffer)) |
| @@ -2095,7 +2096,7 @@ It is called with three arguments, as if it were | |||
| 2095 | replace-lax-whitespace) | 2096 | replace-lax-whitespace) |
| 2096 | (isearch-regexp-lax-whitespace | 2097 | (isearch-regexp-lax-whitespace |
| 2097 | replace-regexp-lax-whitespace) | 2098 | replace-regexp-lax-whitespace) |
| 2098 | (isearch-case-fold-search case-fold-search) | 2099 | (isearch-case-fold-search case-fold) |
| 2099 | (isearch-forward (not backward)) | 2100 | (isearch-forward (not backward)) |
| 2100 | (isearch-other-end match-beg) | 2101 | (isearch-other-end match-beg) |
| 2101 | (isearch-error nil)) | 2102 | (isearch-error nil)) |
diff --git a/lisp/sort.el b/lisp/sort.el index 8bc71388ad5..7f8acfc9b83 100644 --- a/lisp/sort.el +++ b/lisp/sort.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; sort.el --- commands to sort text in an Emacs buffer | 1 | ;;; sort.el --- commands to sort text in an Emacs buffer -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986-1987, 1994-1995, 2001-2016 Free Software | 3 | ;; Copyright (C) 1986-1987, 1994-1995, 2001-2016 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
diff --git a/lisp/xml.el b/lisp/xml.el index 414300cb402..2563c13094f 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; xml.el --- XML parser | 1 | ;;; xml.el --- XML parser -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2000-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2000-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -401,9 +401,9 @@ Both features can be combined by providing a cons cell | |||
| 401 | parse-dtd) | 401 | parse-dtd) |
| 402 | (setq dtd (car result)) | 402 | (setq dtd (car result)) |
| 403 | (if (cdr result) ; possible leading comment | 403 | (if (cdr result) ; possible leading comment |
| 404 | (add-to-list 'xml (cdr result)))) | 404 | (push (cdr result) xml))) |
| 405 | (t | 405 | (t |
| 406 | (add-to-list 'xml result)))) | 406 | (push result xml)))) |
| 407 | (goto-char (point-max)))) | 407 | (goto-char (point-max)))) |
| 408 | (if parse-dtd | 408 | (if parse-dtd |
| 409 | (cons dtd (nreverse xml)) | 409 | (cons dtd (nreverse xml)) |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index a2b64019f97..5fb977d99e5 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; xt-mouse.el --- support the mouse when emacs run in an xterm | 1 | ;;; xt-mouse.el --- support the mouse when emacs run in an xterm -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 2000-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 2000-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||