diff options
| author | Basil L. Contovounesios | 2020-06-21 13:42:14 +0100 |
|---|---|---|
| committer | Basil L. Contovounesios | 2020-06-21 13:42:14 +0100 |
| commit | 1ecd350f38ee782cdebf4b08a59f2c1974ad44bd (patch) | |
| tree | 7fcad02ffb6e21175a34361064479c399409be1e | |
| parent | 4cc6854cd4b0857e223ed6bc1b1b1a051dd83480 (diff) | |
| download | emacs-1ecd350f38ee782cdebf4b08a59f2c1974ad44bd.tar.gz emacs-1ecd350f38ee782cdebf4b08a59f2c1974ad44bd.zip | |
Evaluate some unnecessarily quoted lambdas
* lisp/cedet/semantic/complete.el
(semantic-displayer-tooltip-max-tags):
* lisp/emacs-lisp/benchmark.el (benchmark-run-compiled):
* lisp/emacs-lisp/package.el (package--default-summary)
(package-menu-filter-by-version):
* lisp/eshell/em-pred.el (eshell-pred-file-time):
* lisp/progmodes/verilog-mode.el (verilog-auto-lineup)
(verilog-auto-reset-widths, verilog-auto-arg-format)
(verilog-auto-inst-vector, verilog-auto-inst-template-numbers):
* lisp/textmodes/bibtex.el (bibtex-dialect):
* test/lisp/autoinsert-tests.el
(autoinsert-tests-define-auto-insert-before)
(autoinsert-tests-define-auto-insert-after): Remove some unnecessary
quoting around anonymous functions.
| -rw-r--r-- | lisp/cedet/semantic/complete.el | 8 | ||||
| -rw-r--r-- | lisp/emacs-lisp/benchmark.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 12 | ||||
| -rw-r--r-- | lisp/eshell/em-pred.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/verilog-mode.el | 10 | ||||
| -rw-r--r-- | lisp/textmodes/bibtex.el | 10 | ||||
| -rw-r--r-- | test/lisp/autoinsert-tests.el | 8 |
7 files changed, 28 insertions, 30 deletions
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 7abc4360f64..b262ab710f6 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el | |||
| @@ -1635,10 +1635,10 @@ This will not happen if you directly set this variable via `setq'." | |||
| 1635 | :group 'semantic | 1635 | :group 'semantic |
| 1636 | :version "24.3" | 1636 | :version "24.3" |
| 1637 | :type 'integer | 1637 | :type 'integer |
| 1638 | :set '(lambda (sym var) | 1638 | :set (lambda (sym var) |
| 1639 | (set-default sym var) | 1639 | (set-default sym var) |
| 1640 | (when (boundp 'x-max-tooltip-size) | 1640 | (when (boundp 'x-max-tooltip-size) |
| 1641 | (setcdr x-max-tooltip-size (max (1+ var) (cdr x-max-tooltip-size)))))) | 1641 | (setcdr x-max-tooltip-size (max (1+ var) (cdr x-max-tooltip-size)))))) |
| 1642 | 1642 | ||
| 1643 | 1643 | ||
| 1644 | (defclass semantic-displayer-tooltip (semantic-displayer-traditional) | 1644 | (defclass semantic-displayer-tooltip (semantic-displayer-traditional) |
diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index a7fcc5cb8f2..984c62ddd54 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el | |||
| @@ -81,7 +81,7 @@ result. The overhead of the `lambda's is accounted for." | |||
| 81 | (gcs (make-symbol "gcs")) | 81 | (gcs (make-symbol "gcs")) |
| 82 | (gc (make-symbol "gc")) | 82 | (gc (make-symbol "gc")) |
| 83 | (code (byte-compile `(lambda () ,@forms))) | 83 | (code (byte-compile `(lambda () ,@forms))) |
| 84 | (lambda-code (byte-compile '(lambda ())))) | 84 | (lambda-code (byte-compile (lambda ())))) |
| 85 | `(let ((,gc gc-elapsed) | 85 | `(let ((,gc gc-elapsed) |
| 86 | (,gcs gcs-done)) | 86 | (,gcs gcs-done)) |
| 87 | (list ,(if (or (symbolp repetitions) (> repetitions 1)) | 87 | (list ,(if (or (symbolp repetitions) (> repetitions 1)) |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 6fc80594125..e6f54d206d8 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -441,9 +441,9 @@ synchronously." | |||
| 441 | &aux | 441 | &aux |
| 442 | (name (intern name-string)) | 442 | (name (intern name-string)) |
| 443 | (version (version-to-list version-string)) | 443 | (version (version-to-list version-string)) |
| 444 | (reqs (mapcar #'(lambda (elt) | 444 | (reqs (mapcar (lambda (elt) |
| 445 | (list (car elt) | 445 | (list (car elt) |
| 446 | (version-to-list (cadr elt)))) | 446 | (version-to-list (cadr elt)))) |
| 447 | (if (eq 'quote (car requirements)) | 447 | (if (eq 'quote (car requirements)) |
| 448 | (nth 1 requirements) | 448 | (nth 1 requirements) |
| 449 | requirements))) | 449 | requirements))) |
| @@ -3871,9 +3871,9 @@ If VERSION is nil or the empty string, show all packages." | |||
| 3871 | (package-menu--generate t t) | 3871 | (package-menu--generate t t) |
| 3872 | (package-menu--filter-by | 3872 | (package-menu--filter-by |
| 3873 | (let ((fun (pcase predicate | 3873 | (let ((fun (pcase predicate |
| 3874 | ('= 'version-list-=) | 3874 | ('= #'version-list-=) |
| 3875 | ('< 'version-list-<) | 3875 | ('< #'version-list-<) |
| 3876 | ('> '(lambda (a b) (not (version-list-<= a b)))) | 3876 | ('> (lambda (a b) (not (version-list-<= a b)))) |
| 3877 | (_ (error "Unknown predicate: %s" predicate)))) | 3877 | (_ (error "Unknown predicate: %s" predicate)))) |
| 3878 | (ver (version-to-list version))) | 3878 | (ver (version-to-list version))) |
| 3879 | (lambda (pkg-desc) | 3879 | (lambda (pkg-desc) |
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 7219af45f54..c26f654e278 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el | |||
| @@ -451,11 +451,9 @@ resultant list of strings." | |||
| 451 | `(lambda (file) | 451 | `(lambda (file) |
| 452 | (let ((attrs (file-attributes file))) | 452 | (let ((attrs (file-attributes file))) |
| 453 | (if attrs | 453 | (if attrs |
| 454 | (,(if (eq qual ?-) | 454 | (,(cond ((eq qual ?-) #'time-less-p) |
| 455 | 'time-less-p | 455 | ((eq qual ?+) (lambda (a b) (time-less-p b a))) |
| 456 | (if (eq qual ?+) | 456 | (#'time-equal-p)) |
| 457 | '(lambda (a b) (time-less-p b a)) | ||
| 458 | 'time-equal-p)) | ||
| 459 | ,when (nth ,attr-index attrs))))))) | 457 | ,when (nth ,attr-index attrs))))))) |
| 460 | 458 | ||
| 461 | (defun eshell-pred-file-type (type) | 459 | (defun eshell-pred-file-type (type) |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 87f901ae113..6400e1e6cd9 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -605,7 +605,7 @@ are lineup only when \\[verilog-pretty-declarations] is typed." | |||
| 605 | (function :tag "Other")) | 605 | (function :tag "Other")) |
| 606 | :group 'verilog-mode-indent ) | 606 | :group 'verilog-mode-indent ) |
| 607 | (put 'verilog-auto-lineup 'safe-local-variable | 607 | (put 'verilog-auto-lineup 'safe-local-variable |
| 608 | '(lambda (x) (memq x '(nil all assignments declarations)))) | 608 | (lambda (x) (memq x '(nil all assignments declarations)))) |
| 609 | 609 | ||
| 610 | (defcustom verilog-indent-level 3 | 610 | (defcustom verilog-indent-level 3 |
| 611 | "Indentation of Verilog statements with respect to containing block." | 611 | "Indentation of Verilog statements with respect to containing block." |
| @@ -1118,7 +1118,7 @@ SystemVerilog designs." | |||
| 1118 | :type 'boolean | 1118 | :type 'boolean |
| 1119 | :group 'verilog-mode-auto) | 1119 | :group 'verilog-mode-auto) |
| 1120 | (put 'verilog-auto-reset-widths 'safe-local-variable | 1120 | (put 'verilog-auto-reset-widths 'safe-local-variable |
| 1121 | '(lambda (x) (memq x '(nil t unbased)))) | 1121 | (lambda (x) (memq x '(nil t unbased)))) |
| 1122 | 1122 | ||
| 1123 | (defcustom verilog-assignment-delay "" | 1123 | (defcustom verilog-assignment-delay "" |
| 1124 | "Text used for delays in delayed assignments. Add a trailing space if set." | 1124 | "Text used for delays in delayed assignments. Add a trailing space if set." |
| @@ -1138,7 +1138,7 @@ line." | |||
| 1138 | (const :tag "Line up Assignment statements" single)) | 1138 | (const :tag "Line up Assignment statements" single)) |
| 1139 | :group 'verilog-mode-auto) | 1139 | :group 'verilog-mode-auto) |
| 1140 | (put 'verilog-auto-arg-format 'safe-local-variable | 1140 | (put 'verilog-auto-arg-format 'safe-local-variable |
| 1141 | '(lambda (x) (memq x '(packed single)))) | 1141 | (lambda (x) (memq x '(packed single)))) |
| 1142 | 1142 | ||
| 1143 | (defcustom verilog-auto-arg-sort nil | 1143 | (defcustom verilog-auto-arg-sort nil |
| 1144 | "Non-nil means AUTOARG signal names will be sorted, not in declaration order. | 1144 | "Non-nil means AUTOARG signal names will be sorted, not in declaration order. |
| @@ -1263,7 +1263,7 @@ otherwise no vectors if sizes match (like using nil)." | |||
| 1263 | :group 'verilog-mode-auto | 1263 | :group 'verilog-mode-auto |
| 1264 | :type '(choice (const nil) (const t) (const unsigned))) | 1264 | :type '(choice (const nil) (const t) (const unsigned))) |
| 1265 | (put 'verilog-auto-inst-vector 'safe-local-variable | 1265 | (put 'verilog-auto-inst-vector 'safe-local-variable |
| 1266 | '(lambda (x) (memq x '(nil t unsigned)))) | 1266 | (lambda (x) (memq x '(nil t unsigned)))) |
| 1267 | 1267 | ||
| 1268 | (defcustom verilog-auto-inst-template-numbers nil | 1268 | (defcustom verilog-auto-inst-template-numbers nil |
| 1269 | "If true, when creating templated ports with AUTOINST, add a comment. | 1269 | "If true, when creating templated ports with AUTOINST, add a comment. |
| @@ -1280,7 +1280,7 @@ won't merge conflict." | |||
| 1280 | :group 'verilog-mode-auto | 1280 | :group 'verilog-mode-auto |
| 1281 | :type '(choice (const nil) (const t) (const lhs))) | 1281 | :type '(choice (const nil) (const t) (const lhs))) |
| 1282 | (put 'verilog-auto-inst-template-numbers 'safe-local-variable | 1282 | (put 'verilog-auto-inst-template-numbers 'safe-local-variable |
| 1283 | '(lambda (x) (memq x '(nil t lhs)))) | 1283 | (lambda (x) (memq x '(nil t lhs)))) |
| 1284 | 1284 | ||
| 1285 | (defcustom verilog-auto-inst-template-required nil | 1285 | (defcustom verilog-auto-inst-template-required nil |
| 1286 | "If non-nil, when creating a port with AUTOINST, require a template. | 1286 | "If non-nil, when creating a port with AUTOINST, require a template. |
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 4712f314080..0018b89d858 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -850,11 +850,11 @@ Predefined dialects include BibTeX and biblatex." | |||
| 850 | To interactively change the dialect use the command `bibtex-set-dialect'." | 850 | To interactively change the dialect use the command `bibtex-set-dialect'." |
| 851 | :group 'bibtex | 851 | :group 'bibtex |
| 852 | :version "24.1" | 852 | :version "24.1" |
| 853 | :set '(lambda (symbol value) | 853 | :set (lambda (symbol value) |
| 854 | (set-default symbol value) | 854 | (set-default symbol value) |
| 855 | ;; `bibtex-set-dialect' is undefined during loading (no problem) | 855 | ;; `bibtex-set-dialect' is undefined during loading (no problem). |
| 856 | (if (fboundp 'bibtex-set-dialect) | 856 | (if (fboundp 'bibtex-set-dialect) |
| 857 | (bibtex-set-dialect value))) | 857 | (bibtex-set-dialect value))) |
| 858 | :type '(choice (const BibTeX) | 858 | :type '(choice (const BibTeX) |
| 859 | (const biblatex) | 859 | (const biblatex) |
| 860 | (symbol :tag "Custom"))) | 860 | (symbol :tag "Custom"))) |
diff --git a/test/lisp/autoinsert-tests.el b/test/lisp/autoinsert-tests.el index 574763c4b3d..eafa9c6c02c 100644 --- a/test/lisp/autoinsert-tests.el +++ b/test/lisp/autoinsert-tests.el | |||
| @@ -79,10 +79,10 @@ | |||
| 79 | 79 | ||
| 80 | (ert-deftest autoinsert-tests-define-auto-insert-before () | 80 | (ert-deftest autoinsert-tests-define-auto-insert-before () |
| 81 | (let ((auto-insert-alist | 81 | (let ((auto-insert-alist |
| 82 | (list (cons 'text-mode '(lambda () (insert "foo"))))) | 82 | (list (cons 'text-mode (lambda () (insert "foo"))))) |
| 83 | (auto-insert-query nil)) | 83 | (auto-insert-query nil)) |
| 84 | (define-auto-insert 'text-mode | 84 | (define-auto-insert 'text-mode |
| 85 | '(lambda () (insert "bar"))) | 85 | (lambda () (insert "bar"))) |
| 86 | (with-temp-buffer | 86 | (with-temp-buffer |
| 87 | (text-mode) | 87 | (text-mode) |
| 88 | (auto-insert) | 88 | (auto-insert) |
| @@ -90,10 +90,10 @@ | |||
| 90 | 90 | ||
| 91 | (ert-deftest autoinsert-tests-define-auto-insert-after () | 91 | (ert-deftest autoinsert-tests-define-auto-insert-after () |
| 92 | (let ((auto-insert-alist | 92 | (let ((auto-insert-alist |
| 93 | (list (cons 'text-mode '(lambda () (insert "foo"))))) | 93 | (list (cons 'text-mode (lambda () (insert "foo"))))) |
| 94 | (auto-insert-query nil)) | 94 | (auto-insert-query nil)) |
| 95 | (define-auto-insert 'text-mode | 95 | (define-auto-insert 'text-mode |
| 96 | '(lambda () (insert "bar")) | 96 | (lambda () (insert "bar")) |
| 97 | t) | 97 | t) |
| 98 | (with-temp-buffer | 98 | (with-temp-buffer |
| 99 | (text-mode) | 99 | (text-mode) |