From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] map 988d721: Add a pcase pattern for maps and `map-let' based on it Date: Sun, 07 Jun 2015 20:36:22 +0200 Message-ID: <87zj4bfjrt.fsf@web.de> References: <20150602201956.22733.21800@vcs.savannah.gnu.org> <87eglrmdmp.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1433702211 4412 80.91.229.3 (7 Jun 2015 18:36:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jun 2015 18:36:51 +0000 (UTC) Cc: Nicolas Petton , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 07 20:36:42 2015 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 1Z1fR3-0004Mj-Sl for ged-emacs-devel@m.gmane.org; Sun, 07 Jun 2015 20:36:42 +0200 Original-Received: from localhost ([::1]:54968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1fR3-0005EZ-91 for ged-emacs-devel@m.gmane.org; Sun, 07 Jun 2015 14:36:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1fR0-0005ET-9x for emacs-devel@gnu.org; Sun, 07 Jun 2015 14:36:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1fQx-0006FD-49 for emacs-devel@gnu.org; Sun, 07 Jun 2015 14:36:38 -0400 Original-Received: from mout.web.de ([212.227.17.11]:51007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1fQw-0006F3-Qz for emacs-devel@gnu.org; Sun, 07 Jun 2015 14:36:35 -0400 Original-Received: from drachen.dragon ([90.187.86.241]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LbJ4A-1ZUha00AEU-00kyA8; Sun, 07 Jun 2015 20:36:30 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 04 Jun 2015 18:39:49 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:5LP6vCF6IKyi3xpUXUTDOCagPobcYL240qVSHD8+o5ndVvlXFUX 7SMDIpGXZum0pUe6pYpnuy7ewF4lUALQE7p1O/tahkjfVnhVQ1896rFLpcwDYe+Bg+DN2l3 vG177APMNN+pDeSYp8gnuCBp/tzORzsR/ppKAnoX4HeeiNQOR4Z1g2/UB9Yb5joh/0m0rkv uivS5rj+wq2jonlr8zayw== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.11 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:187079 Archived-At: Stefan Monnier writes: > This said, if the main case where the quote would be needed is when KEY > is a (non-keyword) symbol, then it's probably worth the extra > flexibility since you could say that an element of the form SYMBOL is > treated as equivalent to ('SYMBOL SYMBOL), so the extra quote will be > very rarely needed. Now that this has been finished, we should add to the doc what KEY _is_ in the "elements of the form (KEY PAT)", and how it is compared (e.g. say it's interpreted as an expression to be evaluated, and compared with "equal" in the alist case). Perhaps we should also say that only one occurrence of KEY is tested in the alist case (is that true?), e.g. (pcase '((1 . 11) (1 . 9)) ((map (1 (and x (pred (> 10))))) x) (_ 'not-found)) gives not-found, not 9 (which would also make sense). Thanks, Michael.