[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51368: 29.0.50; `cl-case' should error on incorrect use
From: |
Stefan Monnier |
Subject: |
bug#51368: 29.0.50; `cl-case' should error on incorrect use |
Date: |
Sun, 14 Nov 2021 10:08:51 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Ok, I've attached two patches that implement these suggestions.
BTW, there's a third issue which is that
(cl-case EXP
((a b) FOO)
((a c) BAR))
won't warn about the duplicate `a`.
After fixing this, many/most uses of `quote` will already emit
a warning, so maybe it would make the quote/function part of your second
patch unnecessary.
Personally, I just recommend the use of `pcase` over `cl-case` ;-)
BTW, I just noticed the use of the `suspicious` category of
warning messages. Doesn't this category apply to all warnings?
Oh, and for the `nil` case and the presence of branches after
`otherwise`, the warnings could use the same text saying the branch
is unreachable.
Stefan