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: Sat, 19 Dec 2015 16:14:15 +0100 Message-ID: <87poy2tqrc.fsf@web.de> References: <20151216202605.GA3752@acm.fritz.box> <87mvt859cw.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450538096 30813 80.91.229.3 (19 Dec 2015 15:14:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Dec 2015 15:14:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 19 16:14:45 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 1aAJDY-0004Ri-JK for ged-emacs-devel@m.gmane.org; Sat, 19 Dec 2015 16:14:44 +0100 Original-Received: from localhost ([::1]:37642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAJDY-00072m-0s for ged-emacs-devel@m.gmane.org; Sat, 19 Dec 2015 10:14:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAJDJ-00072T-Tb for emacs-devel@gnu.org; Sat, 19 Dec 2015 10:14:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAJDF-0006fJ-T2 for emacs-devel@gnu.org; Sat, 19 Dec 2015 10:14:29 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAJDF-0006fC-M2 for emacs-devel@gnu.org; Sat, 19 Dec 2015 10:14:25 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aAJDB-0003ou-Hi for emacs-devel@gnu.org; Sat, 19 Dec 2015 16:14:21 +0100 Original-Received: from ip-90-186-0-107.web.vodafone.de ([90.186.0.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Dec 2015 16:14:21 +0100 Original-Received: from michael_heerdegen by ip-90-186-0-107.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Dec 2015 16:14:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-186-0-107.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:G27s1axQ7mMUyGsn0Xcdek+38q4= 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:196503 Archived-At: phillip.lord@russet.org.uk (Phillip Lord) writes: > (pcase '(3 1 2) > (`(_ 1 2) > (message "Matched a list of anything followed by (2 3)"))) > > prints nothing. > > while this... > > (pcase '(3 1 2) > (`(,_ 1 2) > (message "Matched a list of anything followed by (2 3)"))) > > prints the message (which should be "followed by (2 3)"). > > I am a bit surprised to find that _ needs , in these examples, and I > think that it's a bug. I think it's intentional, and it fits the documentation. We think of elements in a backquoted list to be all quoted unless explicitly unquoted. It makes no sense that '_ matches any expression. It matches only the symbol _, and that can be useful, too. Michael.