From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: code review request for saveplace with dired buffer Date: Fri, 7 Jun 2013 13:08:05 -0700 (PDT) Message-ID: References: <87ppvy4e0m.fsf@kanis.fr> <8761xpvrma.fsf@kwarm.red-bean.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1370635696 29147 80.91.229.3 (7 Jun 2013 20:08:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Jun 2013 20:08:16 +0000 (UTC) Cc: Ivan Kanis , Stefan Monnier , Emacs Development List To: Glenn Morris , Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 07 22:08:14 2013 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 1Ul2xJ-0008IN-SE for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 22:08:13 +0200 Original-Received: from localhost ([::1]:49346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul2xJ-0000HA-ED for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 16:08:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul2xG-0000Ft-K6 for emacs-devel@gnu.org; Fri, 07 Jun 2013 16:08:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ul2xF-00087n-LH for emacs-devel@gnu.org; Fri, 07 Jun 2013 16:08:10 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:45589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul2xF-00086n-GD; Fri, 07 Jun 2013 16:08:09 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r57K87Eh009951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jun 2013 20:08:07 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r57K86WR026559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Jun 2013 20:08:06 GMT Original-Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r57K85Ot026543; Fri, 7 Jun 2013 20:08:05 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:160252 Archived-At: > > There might be a convention of using `when' instead of `if', when > > there's no possibility of an `else' clause. (I'm not sure about that, > > though, so if someone else is I hope they'll speak up.) >=20 > I'm not aware of a convention. Personally I prefer (if foo) rather than > (when foo) if `foo' is a single item, but since (when foo) =3D=3D > (if (progn foo)), and the compiler optimizes away the useless progn, it > makes no difference in practice. A Common Lisp convention is to use `when' and `unless' when the return valu= e is not important. It communicates to a (human) reader that the body is f= or side effects only. I, for one, use this same convention with Emacs Lisp. I consider code that= depends on the return value of `when' or `unless' to be bad style (mislead= ing). Some will disagree, no doubt.