From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] pcase.el: Add type pattern Date: Tue, 10 Mar 2020 10:40:45 -0700 Message-ID: <87h7ywxg4i.fsf@ericabrahamsen.net> References: <874kuxxuez.fsf@alphapapa.net> <875zfd1i5n.fsf@ericabrahamsen.net> <87sgig8b2y.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2536"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:CTiADxi1SGDtPzywAh1DU9058qk= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 10 18:41:36 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 1jBisq-0000YH-Ht for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Mar 2020 18:41:36 +0100 Original-Received: from localhost ([::1]:37764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBisp-0002Bv-Kx for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Mar 2020 13:41:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48593) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBisD-0001kP-Fd for emacs-devel@gnu.org; Tue, 10 Mar 2020 13:40:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBisB-00084Q-Hb for emacs-devel@gnu.org; Tue, 10 Mar 2020 13:40:57 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:55944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBisB-0007yD-AK for emacs-devel@gnu.org; Tue, 10 Mar 2020 13:40:55 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jBis9-000Xhc-OD for emacs-devel@gnu.org; Tue, 10 Mar 2020 18:40:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 159.69.161.202 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:245434 Archived-At: Adam Porter writes: > Eric Abrahamsen writes: > >> One thing that's nice about cl-typep is that it will correctly identify >> instances of subclasses, which can be nice. Dunno how difficult it might >> be to work that in there, but it's something to consider. Either way >> this is a nice addition. > > Hi Eric, > > Please see the latest patch, attached to my reply to Michael. As > recommended, it uses cl-typep, which allows patterns like: > > (type integer) > (type (integer 0 10)) > > And it should work with subclasses as well. > > Thanks. Works perfectly! Thanks for doing this.