From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Louis-Guillaume Gagnon Newsgroups: gmane.emacs.help Subject: Re: Question about let binding behavior Date: Tue, 08 Oct 2024 07:49:25 +0000 Message-ID: <8fc2872f-dded-4713-9937-61c3af974538@protonmail.com> References: <88c7526c-b7d9-46f8-8799-5825b97d20ba@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5345"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 08 09:50:06 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1sy4ys-0001GF-0L for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Oct 2024 09:50:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sy4yQ-0006u2-32; Tue, 08 Oct 2024 03:49:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sy4yM-0006to-BP for help-gnu-emacs@gnu.org; Tue, 08 Oct 2024 03:49:34 -0400 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sy4yK-0004e0-Sj for help-gnu-emacs@gnu.org; Tue, 08 Oct 2024 03:49:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1728373769; x=1728632969; bh=ZPJhIhUrS8l6LkMTDR933A3SEZ6MBUI6FdPWyLa7AoU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=e0YadJSn7im70s/XC8lgSatyKHkVHpnw2bTVTxwqE2Pb3/BGcaakfzxm52TIJzCii RsG+SqbhLMVoZ/Cz1Gfz0TOBVN0mRbMYDo1peSoTEIloOpWoHuVYDME6egrUTWaNsA P+60YCGZ6O0q5N3sWBILg9o+glD2vybqgf6ynP+RPfYHeewNTnKV0qh67/yM+PfIv9 OT2YWsicF2htxTspn2D5Q0i/Q6YwFU5auliIKxL/9THYCkpOjqxU5q88Yo/0Pbjf36 egfhzxxst/LJlD067DwpwameKPPXRckWQnS5zgP6T6Kdp32sKV6mqU5oE/S1/bhlqD 9hdhflSEfDb/w== In-Reply-To: Feedback-ID: 19925570:user:proton X-Pm-Message-ID: 9b85d9a516957286ae7f36957375b420def3c2ff Received-SPF: pass client-ip=185.70.40.131; envelope-from=gagnonlg@protonmail.com; helo=mail-40131.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148131 Archived-At: Hi Tomas, Le 10/8/24 =C3=A0 8:41 AM, tomas@tuxteam.de a =C3=A9crit=C2=A0: > The binding (i.e. the "thing" linking the symbol baz to the value > '(...) is local. But what you do with that (setcdr... ) is to change > the value itself. Your function returns this (possibly changed) value. That makes sense, but I guess I'm more surprised that the list itself is=20 only evaluated a single time -- I would naively have expected for the=20 list to be created anew every time the function is called but that's=20 evidently not what's happening. > Did that help? It did! Thanks. Cheers, L-G