help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding the "let" construct and the setting of variables


From: Joost Kremers
Subject: Re: Understanding the "let" construct and the setting of variables
Date: Thu, 17 Dec 2020 09:10:54 +0100
User-agent: mu4e 1.5.7; emacs 27.1.50

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 all the 
> other
> variables you've setq'ed), and since there are no packages or namespaces in
> Elisp, your variable is now available to all of Emacs.
>
> QUESTION: What happens if one does a "setq" on a variable defined in the 
> 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 the 
> variables defined within
> the binding section of "let".

Yes.

> QUESTION: Can one update a variable in the body of the "let" (the variable 
> being defined within
> the binding section of "let").

Yes, with `setq`.


-- 
Joost Kremers
Life has its moments



reply via email to

[Prev in Thread] Current Thread [Next in Thread]