unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: PATCH: Explicitly show how let works on global-variables
Date: Tue, 4 Oct 2022 10:09:38 +0200	[thread overview]
Message-ID: <CAO48Bk_EaD5ZVA-z9tFySA27=6-UacmRjyjbU3stCTo2E7298Q@mail.gmail.com> (raw)
In-Reply-To: <83czb8vxdo.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]

Hi Eli,

may be. But in my case it didn't. I was misled by the term 'local variable'
coming from (and using) other programming languages.

As I understood the text (and to continue with the system-time-locale) I
understood as local variable a 'value that was stored in the function's
stack' to be used in the scope of the let. That implied (once again in my
understanding) that the global system-time-locale would not be affected and
hence format-time-string would not see the change in the value within the
let.

An example like this would have helped me (and possibly shaped the way I
use elisp)...

Just my .02 cents, /PA

On Tue, 4 Oct 2022 at 09:52, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> > 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?
>


-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2558 bytes --]

  reply	other threads:[~2022-10-04  8:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04  6:46 PATCH: Explicitly show how let works on global-variables Pedro Andres Aranda Gutierrez
2022-10-04  7:52 ` Eli Zaretskii
2022-10-04  8:09   ` Pedro Andres Aranda Gutierrez [this message]
2022-10-04 11:36     ` Phil Sainty
2022-10-04 13:43       ` Stefan Monnier
2022-10-04 22:22       ` Tim Cross
2022-10-05  5:28         ` Pedro Andres Aranda Gutierrez
2022-10-06  9:00           ` Pedro Andres Aranda Gutierrez
2022-10-06 19:34             ` Emanuel Berg
2022-10-04 17:39   ` Richard Stallman
2022-10-04  7:59 ` tomas
2022-10-04 11:56   ` Phil Sainty
2022-10-04 13:48     ` Stefan Monnier
2022-10-05 21:31     ` Richard Stallman
2022-10-04 15:00 ` [External] : " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO48Bk_EaD5ZVA-z9tFySA27=6-UacmRjyjbU3stCTo2E7298Q@mail.gmail.com' \
    --to=paaguti@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).