diff options
| author | Mattias EngdegÄrd | 2023-09-09 13:04:54 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-09-09 13:24:31 +0200 |
| commit | c137b5195b633c5c931c35385fdb3e75b9ee5f09 (patch) | |
| tree | e2e8b16188c6dc032570d9429f9971ba36d86c91 /java/org/gnu | |
| parent | 176b7dad71ee92aeab7cdc75db8a5d4f9648fb54 (diff) | |
| download | emacs-c137b5195b633c5c931c35385fdb3e75b9ee5f09.tar.gz emacs-c137b5195b633c5c931c35385fdb3e75b9ee5f09.zip | |
Add byte-compiler warning about useless trailing cond clauses
Warn about clauses after the default clause, as in
(cond ((= x 0) (say "none"))
(t (say "some"))
(say "goodbye"))
because they are very much an indicator of a mistake (such as
misplaced brackets), and since they are deleted by the optimiser, any
other warnings there are lost and the user wouldn't know that
something is wrong otherwise.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Add warning.
* etc/NEWS: Announce.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Add test case.
Diffstat (limited to 'java/org/gnu')
0 files changed, 0 insertions, 0 deletions