From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: The poor state of documentation of pcase like things. Date: Thu, 17 Dec 2015 23:07:53 -0500 Message-ID: References: <20151216202605.GA3752@acm.fritz.box> Reply-To: rms@gnu.org NNTP-Posting-Host: plane.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: ger.gmane.org 1450411707 1528 80.91.229.3 (18 Dec 2015 04:08:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Dec 2015 04:08:27 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org, kaushal.modi@gmail.com To: John Wiegley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 18 05:08:13 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 1a9mKx-0005dH-UU for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2015 05:08:12 +0100 Original-Received: from localhost ([::1]:58312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9mKx-0004z9-8t for ged-emacs-devel@m.gmane.org; Thu, 17 Dec 2015 23:08:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9mKk-0004yx-RV for emacs-devel@gnu.org; Thu, 17 Dec 2015 23:07:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9mKk-0001xo-0b for emacs-devel@gnu.org; Thu, 17 Dec 2015 23:07:58 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9mKg-0001wq-EV; Thu, 17 Dec 2015 23:07:54 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1a9mKf-0001J7-Bm; Thu, 17 Dec 2015 23:07:53 -0500 In-reply-to: (message from John Wiegley on Thu, 17 Dec 2015 16:42:13 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:196447 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > There are many special UPatterns, and their variety makes this the hardest > aspect to master. Let's consider them one by one. > ## Underscore `_' > To match against anything whatsoever, no matter its type or value, use > underscore. Thus to match against a list containing anything at all at its > head, we'd use: > (pcase value > (`(_ 1 2) > (message "Matched a list of anything followed by (2 3)"))) I don't follow this part. (_ 1 2) seems to be a QPattern. Is that right? So how is it that an element can be a UPattern? It would help if some of the examples used symbols inside a QPattern, without comma, so we can see what that does. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.