summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/macroexp-resources
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-12-17 14:48:34 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2022-12-18 14:55:02 +0100
commit730a39e8810e91ad3bb70af191229b78c3858983 (patch)
tree8dcaf45d517860136fb2302dd866d4c2a48d6ac5 /test/lisp/emacs-lisp/macroexp-resources
parent68fb06f47fd09d36a3d1d35a4d24bf40489bea19 (diff)
downloademacs-730a39e8810e91ad3bb70af191229b78c3858983.tar.gz
emacs-730a39e8810e91ad3bb70af191229b78c3858983.tar.bz2
emacs-730a39e8810e91ad3bb70af191229b78c3858983.zip
Warn about lambda expressions in comparisons
Lambda expressions are not comparable; warn about calls such as (eq x (lambda ...)) etc. * lisp/emacs-lisp/bytecomp.el (bytecomp--dodgy-eq-arg): Rename to... (bytecomp--dodgy-eq-arg-p): ...this. Use pcase. Add lambda checks. (bytecomp--value-type-description, bytecomp--arg-type-description) (bytecomp--check-eq-args, bytecomp--check-memq-args): Add function checks. Update calls. Make compiler-macro arguments optional to avoid crashes in malformed code. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--with-warning-test): Simplify argument. Run each compilation with a fresh (empty) warning cache. Add ert-info for easier debugging. (bytecomp-warn-dodgy-args-eq, bytecomp-warn-dodgy-args-memq): Add lambda tests.
Diffstat (limited to 'test/lisp/emacs-lisp/macroexp-resources')
0 files changed, 0 insertions, 0 deletions