GNU bug report logs - #51368
29.0.50; `cl-case' should error on incorrect use

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Sun, 24 Oct 2021 07:53:01 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 51368 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 51368 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#51368: 29.0.50; `cl-case' should error on incorrect use
Date: Sun, 14 Nov 2021 10:08:51 -0500
> 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





This bug report was last modified 1 year and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.