GNU bug report logs - #16567
24.3.50; pcase should signal an error if no case matches

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Mon, 27 Jan 2014 09:24:01 UTC

Severity: wishlist

Found in version 24.3.50

Fixed in version 25.1

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daimrod <daimrod <at> gmail.com>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 16567 <at> debbugs.gnu.org
Subject: bug#16567: 24.3.50; pcase should signal an error if no case matches
Date: Mon, 27 Jan 2014 11:27:26 +0100
Helmut Eller <eller.helmut <at> gmail.com> writes:

> pcase returns nil for this example:
>
>  (pcase 3
>    (1 1)
>    (2 2))
>
> it would be more useful if it would signal an error instead.  Manually
> adding a "catch-all case" and inventing some error message is tedious
> and it's also easy to forget.

Wouldn't a `epcase' (as in `cl-ecase') be more appropriate for this
use-case?

-- 
Daimrod/Greg




This bug report was last modified 10 years and 289 days ago.

Previous Next


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