From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: Re: Understanding the "let" construct and the setting of variables Date: Thu, 17 Dec 2020 09:43:30 +0100 Message-ID: References: <87zh2d1byp.fsf@fastmail.fm> <87o8is26nu.fsf@fastmail.fm> 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="6348"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 17 09:44:35 2020 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 1kpotm-0001Xn-8v for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 09:44:34 +0100 Original-Received: from localhost ([::1]:46692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpotl-0002ih-BJ for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 03:44:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpotF-0002iN-Ot for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 03:44:01 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:58063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpotC-0004m1-5G for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 03:44:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1608194610; bh=xARJULkBjrE3x7evmtilCa5Q2m+3OyAB8aGHCZhdZnQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=PndN10vXojZon479DyJLROOCYmEFCCnFUkVP/Dr/F3UFF+gwSg2u75ScEei8oXwwX ehhAJwZ4mNGx+ArsWp3pzx/1nnVbrNoMMO5CV3UJEJGigBac6ZXwYZ5ur+GsWOck3h IWIJAX7y7bYmW22RgmkQ0H5gYvQibQglre/LRMO4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs11.server.lan [172.19.170.179]) (via HTTP); Thu, 17 Dec 2020 09:43:30 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87o8is26nu.fsf@fastmail.fm> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:QYd/Ml1KluXZWMeIh9luCGSAAyIC2NmOtFynpj6xhHefkUuBGuGDWHnLxSuFwQ3c4VEAT nX0X3QoezvFy5KPrbu3KZghI7FeyMTUIjklvCnY2f2gWRMQ/EXlHazQNudL0W9iqdwsj8muvWwdQ M4NBlEeRhQqHPDwPjgld9p/0NK1YISNTH5jIhYTLn8iPjFNNekG195mrPWiD1szHKjpCGGNi5Wwh IIEt0YS6pQbnHfOhE3efqSEIYGwnzNu0hF5V5a8sGG6T1M6O1LJ+uWNXJFwALMtqpUAmrz7Kwclj yg= X-UI-Out-Filterresults: notjunk:1;V03:K0:8lFbClnIHxM=:fMYIU9a0/LFN9gczK1dBX3 tDlH0q4Vf9YUE1/kow79jdxKTHVnLj3qir/w0wEo5uXqTgDE9ppcZa+rsvar4l+a+G6Vf5j2t 67ljT/RfCB95m5uSAIr4hbkytDP/catKPh6HECI7WUpeqU+P6zuyilP4INEnA/6IvQMZAiK1o qL9pCOD1JSkX9RLE2+ViAZ79q6oLXNAga+dThjBUHte0pq6IMNoeZquXCZY5rpwogKAZQZ2XI Uy1Ys7NaF7G5PuIqfrB1nDRE/812NQOb2qwNnySk1c+McXwr2PsjM2uD0SID2LnP5txLlyQu/ 0EPaIOPObEePnOsbSsOVJlAzMbHmZulZBabPWWYPSHNaChK+jK1k7R+PTvLglaOtLtP7OZTmt Up47nnQFS/23ie//qI038yrpQ67+UYAWkBZ3uJ9EBzJpln9IbWtmxYcGNLDrbCaIlrz3t7tp5 6YZpWocuW3z1KndAh+/8/9wLZyd0LwY4kTlsJFLcttcdnMPzdsAU5VF3RqlhQ7DRWUfHsF3hl aauetPW936Ul6KMbe3oeiXqCN8mj6FrrlV2OOpXQzl1iS3oQYGrFRnpwlYnPQ/M18rJ5wokne uMUkhNfS/bmjE= Received-SPF: pass client-ip=212.227.15.18; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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.23 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" Xref: news.gmane.io gmane.emacs.help:126457 Archived-At: > Sent: Thursday, December 17, 2020 at 9:10 AM > From: "Joost Kremers" > To: steve-humphreys@gmx.com > Cc: help-gnu-emacs@gnu.org > Subject: Re: Understanding the "let" construct and the setting of variab= les > > > On Thu, Dec 17 2020, steve-humphreys@gmx.com wrote: > > Finally I got some useful information (ielm). Fantastic. > > > > ACCEPTED: Running function has created a global variable `tim` (plus a= ll the other > > variables you've setq'ed), and since there are no packages or namespac= es in > > Elisp, your variable is now available to all of Emacs. > > > > QUESTION: What happens if one does a "setq" on a variable defined in t= he binding part of the > > "let"? Can one do that? > > Yes, inside the body of the `let`, you can. > > > QUESTION: What goes in the body of a "let"? I would think I can use t= he variables defined within > > the binding section of "let". > > Yes. > > > QUESTION: Can one update a variable in the body of the "let" (the vari= able being defined within > > the binding section of "let"). > > Yes, with `setq`. My mistake was that I was trying the variables using (myvar value) in the = body of "let", the same way I was doing in the binding part. That was what confused me when = others iterated that "setq" makes the variables available ta all of emacs. This gets me to "defvar". I have read that "setq" does net actually make a variable. It is defvar that makes a variable available. When reading the "Intro to Emacs Lisp", the focus is on using "setq". Do the question really is this. What happens when one sets an object with= "setq" if elisp does not make a variable from the name? > -- > Joost Kremers > Life has its moments > >