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.
This commit is contained in:
Basil L. Contovounesios 2020-06-21 13:42:14 +01:00
parent 4cc6854cd4
commit 1ecd350f38
7 changed files with 28 additions and 30 deletions

View file

@ -1635,10 +1635,10 @@ This will not happen if you directly set this variable via `setq'."
:group 'semantic
:version "24.3"
:type 'integer
:set '(lambda (sym var)
(set-default sym var)
(when (boundp 'x-max-tooltip-size)
(setcdr x-max-tooltip-size (max (1+ var) (cdr x-max-tooltip-size))))))
:set (lambda (sym var)
(set-default sym var)
(when (boundp 'x-max-tooltip-size)
(setcdr x-max-tooltip-size (max (1+ var) (cdr x-max-tooltip-size))))))
(defclass semantic-displayer-tooltip (semantic-displayer-traditional)

View file

@ -81,7 +81,7 @@ result. The overhead of the `lambda's is accounted for."
(gcs (make-symbol "gcs"))
(gc (make-symbol "gc"))
(code (byte-compile `(lambda () ,@forms)))
(lambda-code (byte-compile '(lambda ()))))
(lambda-code (byte-compile (lambda ()))))
`(let ((,gc gc-elapsed)
(,gcs gcs-done))
(list ,(if (or (symbolp repetitions) (> repetitions 1))

View file

@ -441,9 +441,9 @@ synchronously."
&aux
(name (intern name-string))
(version (version-to-list version-string))
(reqs (mapcar #'(lambda (elt)
(list (car elt)
(version-to-list (cadr elt))))
(reqs (mapcar (lambda (elt)
(list (car elt)
(version-to-list (cadr elt))))
(if (eq 'quote (car requirements))
(nth 1 requirements)
requirements)))
@ -3871,9 +3871,9 @@ If VERSION is nil or the empty string, show all packages."
(package-menu--generate t t)
(package-menu--filter-by
(let ((fun (pcase predicate
('= 'version-list-=)
('< 'version-list-<)
('> '(lambda (a b) (not (version-list-<= a b))))
('= #'version-list-=)
('< #'version-list-<)
('> (lambda (a b) (not (version-list-<= a b))))
(_ (error "Unknown predicate: %s" predicate))))
(ver (version-to-list version)))
(lambda (pkg-desc)

View file

@ -451,11 +451,9 @@ resultant list of strings."
`(lambda (file)
(let ((attrs (file-attributes file)))
(if attrs
(,(if (eq qual ?-)
'time-less-p
(if (eq qual ?+)
'(lambda (a b) (time-less-p b a))
'time-equal-p))
(,(cond ((eq qual ?-) #'time-less-p)
((eq qual ?+) (lambda (a b) (time-less-p b a)))
(#'time-equal-p))
,when (nth ,attr-index attrs)))))))
(defun eshell-pred-file-type (type)

View file

@ -605,7 +605,7 @@ are lineup only when \\[verilog-pretty-declarations] is typed."
(function :tag "Other"))
:group 'verilog-mode-indent )
(put 'verilog-auto-lineup 'safe-local-variable
'(lambda (x) (memq x '(nil all assignments declarations))))
(lambda (x) (memq x '(nil all assignments declarations))))
(defcustom verilog-indent-level 3
"Indentation of Verilog statements with respect to containing block."
@ -1118,7 +1118,7 @@ SystemVerilog designs."
:type 'boolean
:group 'verilog-mode-auto)
(put 'verilog-auto-reset-widths 'safe-local-variable
'(lambda (x) (memq x '(nil t unbased))))
(lambda (x) (memq x '(nil t unbased))))
(defcustom verilog-assignment-delay ""
"Text used for delays in delayed assignments. Add a trailing space if set."
@ -1138,7 +1138,7 @@ line."
(const :tag "Line up Assignment statements" single))
:group 'verilog-mode-auto)
(put 'verilog-auto-arg-format 'safe-local-variable
'(lambda (x) (memq x '(packed single))))
(lambda (x) (memq x '(packed single))))
(defcustom verilog-auto-arg-sort nil
"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)."
:group 'verilog-mode-auto
:type '(choice (const nil) (const t) (const unsigned)))
(put 'verilog-auto-inst-vector 'safe-local-variable
'(lambda (x) (memq x '(nil t unsigned))))
(lambda (x) (memq x '(nil t unsigned))))
(defcustom verilog-auto-inst-template-numbers nil
"If true, when creating templated ports with AUTOINST, add a comment.
@ -1280,7 +1280,7 @@ won't merge conflict."
:group 'verilog-mode-auto
:type '(choice (const nil) (const t) (const lhs)))
(put 'verilog-auto-inst-template-numbers 'safe-local-variable
'(lambda (x) (memq x '(nil t lhs))))
(lambda (x) (memq x '(nil t lhs))))
(defcustom verilog-auto-inst-template-required nil
"If non-nil, when creating a port with AUTOINST, require a template.

View file

@ -850,11 +850,11 @@ Predefined dialects include BibTeX and biblatex."
To interactively change the dialect use the command `bibtex-set-dialect'."
:group 'bibtex
:version "24.1"
:set '(lambda (symbol value)
(set-default symbol value)
;; `bibtex-set-dialect' is undefined during loading (no problem)
(if (fboundp 'bibtex-set-dialect)
(bibtex-set-dialect value)))
:set (lambda (symbol value)
(set-default symbol value)
;; `bibtex-set-dialect' is undefined during loading (no problem).
(if (fboundp 'bibtex-set-dialect)
(bibtex-set-dialect value)))
:type '(choice (const BibTeX)
(const biblatex)
(symbol :tag "Custom")))

View file

@ -79,10 +79,10 @@
(ert-deftest autoinsert-tests-define-auto-insert-before ()
(let ((auto-insert-alist
(list (cons 'text-mode '(lambda () (insert "foo")))))
(list (cons 'text-mode (lambda () (insert "foo")))))
(auto-insert-query nil))
(define-auto-insert 'text-mode
'(lambda () (insert "bar")))
(lambda () (insert "bar")))
(with-temp-buffer
(text-mode)
(auto-insert)
@ -90,10 +90,10 @@
(ert-deftest autoinsert-tests-define-auto-insert-after ()
(let ((auto-insert-alist
(list (cons 'text-mode '(lambda () (insert "foo")))))
(list (cons 'text-mode (lambda () (insert "foo")))))
(auto-insert-query nil))
(define-auto-insert 'text-mode
'(lambda () (insert "bar"))
(lambda () (insert "bar"))
t)
(with-temp-buffer
(text-mode)