From: Richard Stallman <rms@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: eliz@gnu.org, 66756@debbugs.gnu.org
Subject: bug#66756: 30.0.50; [PATCH] Improve discussion of 'let' in Elisp Introduction manual
Date: Wed, 22 Nov 2023 21:57:50 -0500 [thread overview]
Message-ID: <E1r5zuY-00041H-Bl@fencepost.gnu.org> (raw)
In-Reply-To: <f44cca7f-13bb-a41a-c9ce-55f1b736c52b@gmail.com> (message from Jim Porter on Sat, 18 Nov 2023 21:30:11 -0800)
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Your work is good.
After this,
> +;;; -*- lexical-binding: t -*-
> +
> +(setq x 1)
> +
> +(defun getx ()
> + x)
> +
> +(let ((x 2))
> + (getx))
> + @result{} 1
> +@end example
it could be good to add the following:
+(setq x 3)
+
+(let ((x 2))
+ (getx))
+ @result{} 3
+
+(setq x '(foo))
+
+(let ((x 2))
+ (getx))
+ @result{} (foo)
+@end example
to show that `getx' accesses the current value of the global binding,
not the value that the global binding had when getx was defined.
Adding this to the lexical binding example
+(setq x 3)
+
+(let ((x 2))
+ (getx))
+ @result{} 2
+
+(setq x '(foo))
+
+(let ((x 2))
+ (getx))
+ @result{} 2
could also help, by showing that changes in the global binding's value
are irrelevant for references to x where that binding is shadowed.
Or perhaps this pair of examples should be presented as a separate
point following the other one.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
next prev parent reply other threads:[~2023-11-23 2:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 5:54 bug#66756: 30.0.50; [PATCH] Improve discussion of 'let' in Elisp Introduction manual Jim Porter
2023-10-26 18:30 ` Jim Porter
2023-10-29 16:38 ` Richard Stallman
2023-10-29 17:18 ` Drew Adams
2023-11-18 2:09 ` Jim Porter
2023-11-19 3:39 ` Richard Stallman
2023-11-19 5:25 ` Jim Porter
2023-11-19 5:30 ` Jim Porter
2023-11-19 8:38 ` Michael Albinus
2023-11-19 20:17 ` Jim Porter
2023-11-19 23:05 ` Jim Porter
2023-11-20 13:28 ` Michael Albinus
2023-11-23 2:57 ` Richard Stallman [this message]
2023-11-23 21:04 ` Jim Porter
2023-11-24 7:06 ` Eli Zaretskii
2023-11-24 9:01 ` Jim Porter
2023-11-24 11:41 ` Eli Zaretskii
2023-11-24 21:46 ` Jim Porter
2023-11-25 7:51 ` Eli Zaretskii
2023-11-30 21:03 ` Jim Porter
2023-12-01 8:29 ` Eli Zaretskii
2023-12-04 3:08 ` Richard Stallman
2023-12-04 3:08 ` Richard Stallman
2023-12-04 4:34 ` Jim Porter
2023-12-10 19:36 ` Jim Porter
2023-12-16 23:10 ` Stefan Kangas
2023-12-17 20:47 ` Jim Porter
2024-01-09 18:40 ` Jim Porter
2023-12-04 3:08 ` Richard Stallman
2023-11-04 8:27 ` Eli Zaretskii
2023-11-04 16:44 ` Jim Porter
2023-11-06 2:29 ` Richard Stallman
2023-11-06 2:29 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1r5zuY-00041H-Bl@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=66756@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jporterbugs@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.