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: Always using let* Date: Sun, 14 Sep 2014 15:56:19 -0700 (PDT) Message-ID: References: <87fvfukmso.fsf@Equus.decebal.nl> <877g15lunz.fsf@Equus.decebal.nl> 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 1410735429 25008 80.91.229.3 (14 Sep 2014 22:57:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Sep 2014 22:57:09 +0000 (UTC) To: Cecil Westerhof , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 15 00:57:02 2014 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 1XTIj6-000441-0H for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Sep 2014 00:57:00 +0200 Original-Received: from localhost ([::1]:56432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTIj5-0002h0-Jb for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2014 18:56:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTIil-0002gZ-FB for help-gnu-emacs@gnu.org; Sun, 14 Sep 2014 18:56:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTIic-0005Rq-OP for help-gnu-emacs@gnu.org; Sun, 14 Sep 2014 18:56:39 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:16734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTIic-0005Ri-G6 for help-gnu-emacs@gnu.org; Sun, 14 Sep 2014 18:56:30 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s8EMuMCL005176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 14 Sep 2014 22:56:23 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s8EMuL4j006702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 14 Sep 2014 22:56:21 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s8EMuKJP000999; Sun, 14 Sep 2014 22:56:20 GMT In-Reply-To: <877g15lunz.fsf@Equus.decebal.nl> 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: acsinet21.oracle.com [141.146.126.237] 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:99891 Archived-At: > > (let ((c (+ c 4)) > > (b (* c 42))) ; Use original C value: 3 > > ...) >=20 > That makes my head spin. ;-) Does this make it easier for you? (let ((c 5) (b c)) ; Use value of the `c' that is bound outside. ...) And remember that the local binding of `c' to 5 can bind an existing dynamic variable (from, say, `(defvar c 3 "C doc")') for the duration of this `let'. Or it can bind an existing lexically scoped variable `c' from an outer `let' for the scope (or for the duration, if `lexical-binding'=3D`nil') of this inner `let'. Or it can create and bind a new variable. This answers the question of why you might not use a different name from `c': because you want to bind an existing variable named `c'.