From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Replace trivial pcase occurrences in the Emacs sources Date: Wed, 31 Oct 2018 16:07:29 +0000 Message-ID: <20181031160729.GB20575@ACM> References: <83r2g7jrot.fsf@gnu.org> <83k1lzjq0r.fsf@gnu.org> <83in1jjmy4.fsf@gnu.org> <20181031120821.GA20575@ACM> <831s86jey9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1541002283 27396 195.159.176.226 (31 Oct 2018 16:11:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Oct 2018 16:11:23 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 31 17:11:19 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHt5R-000717-FS for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2018 17:11:17 +0100 Original-Received: from localhost ([::1]:60515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHt7X-0003S0-Ep for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2018 12:13:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHt1z-0006Qt-MA for emacs-devel@gnu.org; Wed, 31 Oct 2018 12:07:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHt1v-00009M-LP for emacs-devel@gnu.org; Wed, 31 Oct 2018 12:07:43 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:47494 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gHt1t-00005G-7F for emacs-devel@gnu.org; Wed, 31 Oct 2018 12:07:38 -0400 Original-Received: (qmail 93935 invoked by uid 3782); 31 Oct 2018 16:07:33 -0000 Original-Received: from acm.muc.de (p5B147AF0.dip0.t-ipconnect.de [91.20.122.240]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 31 Oct 2018 17:07:31 +0100 Original-Received: (qmail 20805 invoked by uid 1000); 31 Oct 2018 16:07:29 -0000 Content-Disposition: inline In-Reply-To: <831s86jey9.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:230881 Archived-At: Hello, Eli. On Wed, Oct 31, 2018 at 17:47:26 +0200, Eli Zaretskii wrote: > > From: Stefan Monnier > > Date: Wed, 31 Oct 2018 08:33:42 -0400 > > > Are you willing to put these final touches onto pcase-dolist's doc > > > string, or would you prefer somebody else to do it? > > This is excrutiating for me. Anyone else but me, please, > I will try, if no one beats me to it. A beating attempt, first draught: (pcase-dolist (PATTERN LIST) BODY...) Loop over a list. Evaluate BODY with bindings made by matching PATTERN to each element of LIST in turn. PATTERN is a pcase pattern, the matching being done as described in `pcase'. The return value is not significant. Should the matching fail for any LIST element, the results are undefined. See also `dolist' -- Alan Mackenzie (Nuremberg, Germany).