From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#31311: 27.0; doc of `pcase' Date: Sat, 12 May 2018 15:54:18 +0200 Message-ID: <877eo9kmid.fsf@web.de> References: <83wowqrmp8.fsf@gnu.org> <87efixlv8g.fsf@web.de> <83muxlsvfm.fsf@gnu.org> <871sexlqvw.fsf@web.de> <83k1sps9n3.fsf@gnu.org> <87wowpndoo.fsf@gmail.com> <87fu3c6cm3.fsf@gnuvola.org> <83zi1kqynx.fsf@gnu.org> <871seh3yw8.fsf@gnuvola.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1526133191 12910 195.159.176.226 (12 May 2018 13:53:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 May 2018 13:53:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 31311@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 12 15:53:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHUxO-0003Dc-OZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 May 2018 15:53:06 +0200 Original-Received: from localhost ([::1]:47048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHUzV-0002U5-Si for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 May 2018 09:55:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHUzL-0002JO-0V for bug-gnu-emacs@gnu.org; Sat, 12 May 2018 09:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHUzG-0004qF-3L for bug-gnu-emacs@gnu.org; Sat, 12 May 2018 09:55:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51129) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHUzF-0004px-W9 for bug-gnu-emacs@gnu.org; Sat, 12 May 2018 09:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fHUzF-0006mQ-Jt for bug-gnu-emacs@gnu.org; Sat, 12 May 2018 09:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 May 2018 13:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31311 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31311-submit@debbugs.gnu.org id=B31311.152613326726016 (code B ref 31311); Sat, 12 May 2018 13:55:01 +0000 Original-Received: (at 31311) by debbugs.gnu.org; 12 May 2018 13:54:27 +0000 Original-Received: from localhost ([127.0.0.1]:59025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHUyh-0006lY-FX for submit@debbugs.gnu.org; Sat, 12 May 2018 09:54:27 -0400 Original-Received: from mout.web.de ([212.227.15.4]:53637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHUyf-0006lM-Kl for 31311@debbugs.gnu.org; Sat, 12 May 2018 09:54:26 -0400 Original-Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MKNl8-1fFqof0Myc-001jup; Sat, 12 May 2018 15:54:19 +0200 In-Reply-To: <871seh3y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sqSehjTMwNLqgKjt4ZB gZzDWRiFdRQsM9WQPSBZMpo0u8MOBvWB0ZgyxHuTUGtK8+EfUuslkKYQQh9wl34bd2wGqkge X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146136 Archived-At: Thien-Thi Nguyen writes: > a. (pcase t ('t 'true)) =3D> true > b. (pcase nil ('nil 'false)) =3D> false > c. (pcase t (t 'true)) =3D> true > d. (pcase nil (nil 'false)) |=3D ERROR: Unknown pattern =E2=80=98nil= =E2=80=99 > > and wonder if/how to approach this corner case in the docs. I > suppose before anything, i'd like to confirm that c. and d. are > correct and intended (i believe a. and b. to be correct and > intended, but maybe i'm missing something there, too!). That's all correct and intended - see 3ef31167. t was originally intended as catchall pattern equivalent to _ but has been deprecated (since it was confusing). Try e.g. (pcase nil (t t)) You get a message when you use it, but when evaluating and not when compiling (so you must look in the *Messages* buffer - I don't think this is intended...). A catch-nothing pattern is not useful, so nil is just invalid. I once asked Stefan if t and nil could be handled like the ATOM case, but he didn't want to do this (backward compatibility, don't recall). Michael.