From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#44166: pcase-exhaustive doc string could be more didactic Date: Thu, 22 Oct 2020 20:30:41 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26103"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca To: 44166@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 23 05:33:32 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVnpb-0006hK-H1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Oct 2020 05:33:31 +0200 Original-Received: from localhost ([::1]:54764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVnpa-0004iM-DE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Oct 2020 23:33:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVnnD-0003ES-7f for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2020 23:31:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVnnC-00030L-Rk for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2020 23:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kVnnC-0006vM-Mr; Thu, 22 Oct 2020 23:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Oct 2020 03:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44166 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: monnier@iro.umontreal.ca Original-Received: via spool by submit@debbugs.gnu.org id=B.160342385426601 (code B ref -1); Fri, 23 Oct 2020 03:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Oct 2020 03:30:54 +0000 Original-Received: from localhost ([127.0.0.1]:54406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVnn3-0006uw-L3 for submit@debbugs.gnu.org; Thu, 22 Oct 2020 23:30:53 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVnmz-0006ul-7m for submit@debbugs.gnu.org; Thu, 22 Oct 2020 23:30:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVnmx-00037z-4A for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2020 23:30:47 -0400 Original-Received: from mail-ed1-f42.google.com ([209.85.208.42]:36863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVnmu-0002qN-Qw for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2020 23:30:46 -0400 Original-Received: by mail-ed1-f42.google.com with SMTP id l16so162828eds.3 for ; Thu, 22 Oct 2020 20:30:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to :content-transfer-encoding; bh=w+KOq0wvGpGrAfFbyQMy7yJs9g+Yl4G+pwG+Pm2UeqM=; b=Me4EzUZviO++cVfmu+KPYU+7wquzjsTazwo1qQISRufb1qk0hH2lps1e4JrwNtfwqd T+wyZtXJ64E0gO23Io+B+O+V2cgNdNQVUNOaeDakHLLe7x2CfsehZFSK0try3jTztSCN fUY/QVYH8iPqdsfWiQcP7xZCrxlzQGFNFImGALTtnzj85bee3tU/IOUo3vNTLRd30r8F nqYKaw03QkZsoH1ds4qGU5m4Pmn5qJwzoPriMcYArfxFiXjhB5pqpV1QsM+eM3Drhb6q dbUs/AkH1Omt5JHJwB6/mF1EgZyljODaNYVyLxmKp09+J6uGe/X4suC7ZLuKG1QQ8dR2 1+ug== X-Gm-Message-State: AOAM5310P35Q/URXuNGXo58SWy4tc+G2DWxAcz2Be871daQH7Lx0P1ww Qa2qZDpiT8+weuIl437XFQqrI4CGzO3cITq9rb22B3FL X-Google-Smtp-Source: ABdhPJyjzL55EQ6I3vHdvaOKl/JFH0X8CsstOJOau78U5BPKtREWIQVDjNrf6YmPeBmXyo33r2dVxYR2wRBWY1oZNBw= X-Received: by 2002:aa7:c259:: with SMTP id y25mr312425edo.249.1603423842224; Thu, 22 Oct 2020 20:30:42 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 22 Oct 2020 20:30:41 -0700 Received-SPF: pass client-ip=209.85.208.42; envelope-from=stefankangas@gmail.com; helo=mail-ed1-f42.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/22 23:30:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191333 Archived-At: The doc string of `pcase-exhaustive' could be more didactic. It says: pcase-exhaustive is a Lisp macro in =E2=80=98pcase.el=E2=80=99. (pcase-exhaustive EXP &rest CASES) The exhaustive version of =E2=80=98pcase=E2=80=99 (which see). If EXP fails to match any of the patterns in CASES, an error is signale= d. >From reading the code, I understand that this is the same as pcase, but signals an error if there is no match? If this is correct, may I suggest to amend the doc string as follows? The exhaustive version of =E2=80=98pcase=E2=80=99 (which see). If EXP fails to match any of the patterns in CASES, an error is signaled. In contrast, `pcase' will only return nil if there is no match. Also, should it be added to the ELisp manual?