From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] pcase.el: Add type pattern Date: Mon, 09 Mar 2020 20:38:25 +0200 Message-ID: <837dztbcgu.fsf@gnu.org> References: <874kuxxuez.fsf@alphapapa.net> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="42524"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 09 19:39:59 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jBNJn-000AvV-H1 for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 19:39:59 +0100 Original-Received: from localhost ([::1]:47938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBNJm-00073b-Ic for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 14:39:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42081) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBNIJ-0004oZ-Lo for emacs-devel@gnu.org; Mon, 09 Mar 2020 14:38:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jBNIJ-0004DK-0c; Mon, 09 Mar 2020 14:38:27 -0400 Original-Received: from [176.228.60.248] (port=3614 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jBNII-00063K-G3; Mon, 09 Mar 2020 14:38:26 -0400 In-Reply-To: <874kuxxuez.fsf@alphapapa.net> (message from Adam Porter on Mon, 09 Mar 2020 13:19:48 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245397 Archived-At: > From: Adam Porter > Date: Mon, 09 Mar 2020 13:19:48 -0500 > > It seemed like an obvious and useful improvement to add a "type" pattern > to pcase, so I prepared this patch. I wondered if checking for > predicates like this was a good way to do so, and I saw that the > cl-typep inliner does basically this, so it seems reasonable. > > If this seems like an acceptable idea, please let me know if any further > changes are required. Thanks for working on this. I'll let others comment on whether this should be added, but if it is, it should be documented in the ELisp manual, like all the other patterns supported by pcase.