From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: PATCH: Explicitly show how let works on global-variables Date: Tue, 04 Oct 2022 10:52:35 +0300 Message-ID: <83czb8vxdo.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26532"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Pedro Andres Aranda Gutierrez Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 04 10:20:29 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ofdAD-0006ix-9j for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 10:20:29 +0200 Original-Received: from localhost ([::1]:55080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofdAC-0007FA-1L for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 04:20:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofcjI-0006yu-0R for emacs-devel@gnu.org; Tue, 04 Oct 2022 03:52:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofcjH-0005oj-LS; Tue, 04 Oct 2022 03:52:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=bYRWV6TqqbIpAr1MkSFo2REC7seRszZED9+aST6SehQ=; b=bf7fQ2bGdpycY7DGfnmn 5ympWNbX+XBfBGBzFwhGjM1MHh24JdQbesDD5Fq29hZSr7RfaDtjMMuiaYWyxPuUeJBGSk56fR4WG kKXBDmxta86S4czUUHYZRCStX8dhk7/0MLizHq751a8j0QIIEiLZJPcFZ1vjAgX1rp/88DvliZMk7 IBFuGFqv6OZ45mYDMBQJ87WIHoM1Kuw49oc/UxGDehW9Y6beiYE58rdW0X9rFaLqz49UxMejjht3/ SxTMo5j1J4boA1IWhqbM9me6eXRaWrZZc11fZu4gsSxWJ4roEUthQdcusCUJj+mizzFK4N+NEN+2D DlfUJ2eVx+LUyw==; Original-Received: from [87.69.77.57] (port=2789 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofcjG-00066Y-P6; Tue, 04 Oct 2022 03:52:39 -0400 In-Reply-To: (message from Pedro Andres Aranda Gutierrez on Tue, 4 Oct 2022 08:46:02 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296854 Archived-At: > From: Pedro Andres Aranda Gutierrez > Date: Tue, 4 Oct 2022 08:46:02 +0200 > > this is a small patch for the 'Introduction to Emacs LISP programming' guide to show how let works on > system-wide variables. > Understanding this would have made my life easier the past +20 years ;-) and an example is sometimes > worth 100 lines of explanation (more so if you are in a hurry and you do diagonal reading) This manual already says, in the previous subsection: Local variables created by a ‘let’ expression retain their value _only_ within the ‘let’ expression itself (and within expressions called within the ‘let’ expression); the local variables have no effect outside the ‘let’ expression. Doesn't this cover the issue?