From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: The poor state of documentation of pcase like things. Date: Fri, 01 Jan 2016 19:39:35 +0100 Message-ID: <87bn95m9eg.fsf@fencepost.gnu.org> References: <20151216202605.GA3752@acm.fritz.box> <87io3m60bq.fsf@web.de> <877fk1nnk0.fsf@web.de> <8760zlue3j.fsf@gmail.com> <87vb7kajgv.fsf@web.de> <83y4c9ag06.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451674548 27613 80.91.229.3 (1 Jan 2016 18:55:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jan 2016 18:55:48 +0000 (UTC) Cc: Michael Heerdegen , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 01 19:55:48 2016 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 1aF4ra-0002uo-5N for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2016 19:55:46 +0100 Original-Received: from localhost ([::1]:36517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF4rZ-0003La-IN for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2016 13:55:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF4rW-0003LS-4R for emacs-devel@gnu.org; Fri, 01 Jan 2016 13:55:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aF4rV-0001de-EG for emacs-devel@gnu.org; Fri, 01 Jan 2016 13:55:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF4rV-0001dM-C3; Fri, 01 Jan 2016 13:55:41 -0500 Original-Received: from localhost ([127.0.0.1]:59385 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1aF4rU-0002fz-3Y; Fri, 01 Jan 2016 13:55:40 -0500 Original-Received: by lola (Postfix, from userid 1000) id EC3EDDF8D5; Fri, 1 Jan 2016 19:39:35 +0100 (CET) In-Reply-To: (John Wiegley's message of "Fri, 01 Jan 2016 09:46:29 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:197314 Archived-At: John Wiegley writes: >>>>>> Eli Zaretskii writes: > >> (pcase skip >> (`nil nil) >> (`0 t) >> (_ (setq i (+ i skip -1)) (funcall get-next-frame))))))) > > (cond ((null skip)) > ((eq skip 0) t) > (t (setq i (+ i skip -1)) > (funcall get-next-frame))) > > Not much difference. If skip is nil, the first returns probably nil and the second t. One could probably do (and skip (or (eql skip 0) (setq ...))) I'm not fond of eq for numeric comparisons: that's an Elispism. -- David Kastrup