From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: if vs. when vs. and: style question Date: Mon, 23 Mar 2015 17:34:20 -0700 (PDT) Message-ID: <7061c167-924b-4548-ae0f-af1fab36fc0c@default> References: <87sicvwckx.fsf@wmi.amu.edu.pl> <87mw3345f9.fsf@kuiper.lan.informatimago.com> 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 1427157295 1294 80.91.229.3 (24 Mar 2015 00:34:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Mar 2015 00:34:55 +0000 (UTC) To: "Pascal J. Bourguignon" , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 24 01:34:43 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1YaCnr-0003Jd-3y for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Mar 2015 01:34:43 +0100 Original-Received: from localhost ([::1]:58567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaCnq-0005v9-3a for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Mar 2015 20:34:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaCnc-0005v0-Lm for help-gnu-emacs@gnu.org; Mon, 23 Mar 2015 20:34:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaCnY-0002ZP-IS for help-gnu-emacs@gnu.org; Mon, 23 Mar 2015 20:34:28 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:19399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaCnY-0002ZF-BW for help-gnu-emacs@gnu.org; Mon, 23 Mar 2015 20:34:24 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t2O0YLWf004517 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Mar 2015 00:34:22 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t2O0YLZW003333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 24 Mar 2015 00:34:21 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t2O0YLvh019635; Tue, 24 Mar 2015 00:34:21 GMT In-Reply-To: <87mw3345f9.fsf@kuiper.lan.informatimago.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103278 Archived-At: > (or (find-thingy-in-whatcha name) > (find-thingy-in-macall name) > (find-thingy-in-it name) > (error "not found"))) ... > (and (valid-name-p name name) > (exists-thingy-named name) > (find-thing-or-create name))) Yes, I do that too. It is a case where the behavior of each piece matters (can matter), even if it might not be the case that the return _value_ is used. It's about making use of the behavior of `and' and `or'. But I use `(unless a b)', not `(or a b)' if the code does not use the resulting value and is thus just for the side effects of `b'. Likewise, I use `(when a b)', not `(and a b)', if the value is unimportant.