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: The poor state of documentation of pcase like things. Date: Sun, 20 Dec 2015 13:45:43 +0100 Message-ID: <87wps9thjc.fsf@web.de> References: <20151216202605.GA3752@acm.fritz.box> <877fkatpct.fsf@web.de> <87d1u2npsf.fsf@russet.org.uk> <87fuyykukj.fsf@web.de> <87vb7um6m2.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1450615570 24785 80.91.229.3 (20 Dec 2015 12:46:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Dec 2015 12:46:10 +0000 (UTC) Cc: Alan Mackenzie , nicolas@petton.fr, Kaushal Modi , Emacs developers To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 20 13:46:01 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 1aAdN7-0003Oh-PT for ged-emacs-devel@m.gmane.org; Sun, 20 Dec 2015 13:45:57 +0100 Original-Received: from localhost ([::1]:40551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAdN7-0000eX-6i for ged-emacs-devel@m.gmane.org; Sun, 20 Dec 2015 07:45:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAdN4-0000eQ-55 for emacs-devel@gnu.org; Sun, 20 Dec 2015 07:45:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAdN0-0003Ct-TJ for emacs-devel@gnu.org; Sun, 20 Dec 2015 07:45:54 -0500 Original-Received: from mout.web.de ([212.227.15.4]:63858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAdN0-0003CN-K6 for emacs-devel@gnu.org; Sun, 20 Dec 2015 07:45:50 -0500 Original-Received: from drachen.dragon ([90.186.2.57]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0LsQ9o-1aLXP80jwe-01208G; Sun, 20 Dec 2015 13:45:46 +0100 In-Reply-To: <87vb7um6m2.fsf@russet.org.uk> (Phillip Lord's message of "Sat, 19 Dec 2015 22:11:17 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:NsZ/65+dhxJUSpZLP2D06ouGTkX/1djCJpJ7Y5bLx27pcaMYUMh keRhOrqi+RtaJpTLm80YePCOdG/e419/OZJWBsm0/kFRI/eR88raYMLxetaeqd572mQCSOe pOeaa3kji2EWS+W22aBWgEsSwohhEVA+aBSwGjRAaZr17ysBdsyp6LIErudNH0xOSi/PCbL IrowhleX8xVmzSkmXckGQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:i1sCQdYJQjk=:vz4hZlNhPvGd5E/kS7IrgT A8PscvX8Kk5Esi6pATekFaqVACkuZ0aYIj7fomUueYdE62yf5jsHP9zB3zPxTMHoMFW7OIK9M pIozouJ0semQo6hFpGYC6WV8OUv7PwXedsgu8w2EdugsDoiL5fE5FwUHb4RKHDWNqL9Nval4l Pglt86bNWVAQDkWuLtQRr5YQla8/CRxpYbwlgc5Rt/aikUlOXbddHgFQIUrsn4+55LpKt7HlS 0xvu0TfpLPzZSAPpoFDkUbp67lv88kmvC9gCR3MhkUA3MljXtkpGyKZNIyroRf1NCnsSadaw0 OAeJbLIn7l0hM/OXAmFVNK82fHcmFGm5xwwHQtiFCxxuFljUsZLpiapHUfluHJ5x6fiOu+DmW iVcX+H4NaL25GSxaFtAAFNh1au4xS0DdGIodKtjW/U7YmOyyncGyw8zasj/OBxnDoP9ja4dS1 TNOl/2CWmLer0Yve3sCSBaAN4NDPoqbVOgyzNi2XZL4fVbxBtRyHTH/AXvq8q2R1TUm7wbfhx PSmcTUd0afTbFLyqT3phZ/OETL1ZPbg6BhtCLt6fA/QZhLWWeMejJjLOShU9M4daUwxp2Ife3 rPJlbMoEgCzdB18nRG6nX2a2N7VXwzt2upOHRafQGCwBfqpnUZbD8bsIh1KuryxkWT0GfPy34 MqM8KqtujaHVD7xPXmox1XozDIQPj5mZDO1fa513YoH/1KHaNWE6pZNjnjpt1WPt9OcNwlWgd EFojPh4QjTKo8oVCANeOwZp01yAJGLQzORiKFMtieB8+8CdLPQcaEJ+rRuBgBD3B6w7KCn/J X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.4 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:196545 Archived-At: phillip.lord@russet.org.uk (Phillip Lord) writes: > (pcase '(:a 1) (:a 1) is not a map in the sense of map.el. You probably want an alist: ((:a . 1)). > ((map `(:a ,a)) a)) ``' is a different pattern type. You want to use the `map', and backquote is not part of its syntax. So, this is how the example should look like: (pcase '((:a . 1)) ((map (:a a)) a)) But the doc is not correct indeed: @Nicolas: Can you please correct these sentences of the "map" pcase pattern documentation: ,---------------------------------------------------------------------- | ARGS can be a list of the form (KEY PAT), in which case KEY in an | unquoted form. |=20 | ARGS can also be a list of symbols, which stands for (=E2=80=99SYMBOL | SYMBOL). `---------------------------------------------------------------------- It should say that ARGS can be a list of elements of the form (KEY PAT) ^^^^^^^^^^^ (at least that's how I think it is meant. OTOH, (pcase '((:a . 1) (:b . 2)) ((map (:a a :b b)) (list a b))) gives an error (void variable: b), so I'm not sure) In the second sentence, our new quoting magic messes the quote character in the doc shown in the help buffer. Thanks, Michael.