From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 1d4887a: Improve documentation of 'pcase' Date: Mon, 25 Jan 2016 11:15:38 -0500 Message-ID: References: <20160123102327.23087.15367@vcs.savannah.gnu.org> <87vb6kzft1.fsf@web.de> <837fj05sum.fsf@gnu.org> <87h9i1rcpr.fsf@web.de> <87fuxlptj2.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1453738571 3530 80.91.229.3 (25 Jan 2016 16:16:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Jan 2016 16:16:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 25 17:16:02 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aNjo9-0000vo-Qr for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 17:16:01 +0100 Original-Received: from localhost ([::1]:39483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjo9-0007Rx-2n for ged-emacs-devel@m.gmane.org; Mon, 25 Jan 2016 11:16:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjo2-0007Of-EH for emacs-devel@gnu.org; Mon, 25 Jan 2016 11:15:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNjnx-0005dL-Bc for emacs-devel@gnu.org; Mon, 25 Jan 2016 11:15:54 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:32817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNjnx-0005cq-4F for emacs-devel@gnu.org; Mon, 25 Jan 2016 11:15:49 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aNjnt-0000lv-2R for emacs-devel@gnu.org; Mon, 25 Jan 2016 17:15:45 +0100 Original-Received: from 108.161.125.56 ([108.161.125.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jan 2016 17:15:45 +0100 Original-Received: from monnier by 108.161.125.56 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jan 2016 17:15:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 108.161.125.56 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:pO8vyDAoUW+C252/W9W3XP8yVF8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198787 Archived-At: > FWIW Drew mentioned that it maybe could be cool if the equivalence > predicate could be specified locally for a pcase form like > (pcase my-string #'string-collate-equalp > ("Noël" "Christmas")) We can already do that in the following way: (pcase my-string ((or (pred (string-collate-equalp "Noël")) (pred (string-collate-equalp "Christmas"))) ...)) And if you think that's too verbose, you can define your own pcase-macro so it can turn into something like: (pcase my-string ((or (my-string "Noël") (my-string "Christmas")) ...)) -- Stefan