summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/helper.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-12-29 13:01:47 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2022-12-29 13:01:47 +0100
commit7c63b632e4e2241a28f08015cc981a72e18d7867 (patch)
tree10d0f34d06683a03d5603530afd3e93f91f19834 /lisp/emacs-lisp/helper.el
parent2de25accaf31aef643557ec476041c770fc7ac15 (diff)
downloademacs-7c63b632e4e2241a28f08015cc981a72e18d7867.tar.gz
emacs-7c63b632e4e2241a28f08015cc981a72e18d7867.tar.bz2
emacs-7c63b632e4e2241a28f08015cc981a72e18d7867.zip
Add empty-body warning for when, unless etc
Warn about code like (when SOME-CONDITION) because these may indicate bugs. Warnings currently apply to `when`, `unless`, `ignore-error`, `with-suppressed-warnings` and (as before) `let` and `let*`. * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Update doc string. * lisp/emacs-lisp/bytecomp.el: (byte-compile-warning-types) (byte-compile-warnings): Add empty-body. (byte-compile-initial-macro-environment): Add empty-body warning for with-suppressed-warnings. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use the empty-body category for let and let*. * lisp/subr.el (when, unless, ignore-error): Add empty-body warning. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test--with-suppressed-warnings): Add test cases.
Diffstat (limited to 'lisp/emacs-lisp/helper.el')
0 files changed, 0 insertions, 0 deletions