From: Michael Heerdegen <michael_heerdegen@web.de>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 9c82f480590: Move and edit text about lexical environment representation
Date: Mon, 23 Oct 2023 05:50:16 +0200 [thread overview]
Message-ID: <874jiiuhdz.fsf@web.de> (raw)
In-Reply-To: <26719A7B-F95C-439D-9019-9CF930B48823@acm.org> ("Mattias Engdegård"'s message of "Sun, 22 Oct 2023 10:03:46 +0200")
Mattias Engdegård <mattiase@acm.org> writes:
> > I have two questions/things that are unclear to me: First, the docstring
> > of `eval' talks about LEXICAL as an "alist mapping" which seems not to
> > be exact if it is allowed to contain plain symbols. Should the
> > docstring be clarified as well?
>
> Probably, yes. Doc strings are often somewhat simplified but a little
> accuracy wouldn't cost us much here.
Ok. Should you find some time, maybe you could do that?
> > Second: you wrote "or a symbol representing a dynamically bound
> > variable". Does this variable really have to be bound (to a value), or
> > do you mean "dynamically binding" (aka special)?
>
> The latter: it represents a (defvar SYMBOL) declaration at that point.
> The parameter has exactly the same type as
> internal-interpreter-environment which is described in a comment in
> eval.c.
Is "dynamically bound" a good choice of language, then, or would
"dynamically binding" or something else (like "indicating that this
variable should use dynamic scoping" in the comment you mentioned) be
a bit clearer?
> No, you are right. Example:
>
> (defun pz () (defvar z) z)
>
> (eval '(let ((z 3)) z) t) => 3
> (eval 'z '((z . 4))) => 4
> (eval '(let ((z 5)) (pz)) t) => (void-variable z)
> (eval '(let ((z 6)) (pz)) '(z)) => 6
Thanks. Ok, good, that's all as expected.
Michael.
next prev parent reply other threads:[~2023-10-23 3:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169788667120.25632.15745430411138121616@vcs2.savannah.gnu.org>
[not found] ` <20231021111111.809E3C09BDB@vcs2.savannah.gnu.org>
2023-10-22 4:47 ` master 9c82f480590: Move and edit text about lexical environment representation Michael Heerdegen
2023-10-22 8:03 ` Mattias Engdegård
2023-10-23 3:50 ` Michael Heerdegen [this message]
2023-10-23 12:52 ` Mattias Engdegård
2023-10-24 2:12 ` Michael Heerdegen
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=874jiiuhdz.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.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 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.