From: "Mattias Engdegård" <mattiase@acm.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: master 9c82f480590: Move and edit text about lexical environment representation
Date: Sun, 22 Oct 2023 10:03:46 +0200 [thread overview]
Message-ID: <26719A7B-F95C-439D-9019-9CF930B48823@acm.org> (raw)
In-Reply-To: <87mswbuuuh.fsf@web.de>
22 okt. 2023 kl. 06.47 skrev Michael Heerdegen <michael_heerdegen@web.de>:
>> +Lisp debuggers. Each member of the list is either a cons cell which
>> +represents a lexical symbol-value pair, or a symbol representing a
>> +dynamically bound variable.
>
> 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.
> 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.
> And such a member VAR
> in LEXICAL means that the VAR is special when FORM is evaluated - even
> when the variable has not been declared special in the outer
> context...or something else?
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
next prev parent reply other threads:[~2023-10-22 8:03 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 [this message]
2023-10-23 3:50 ` Michael Heerdegen
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=26719A7B-F95C-439D-9019-9CF930B48823@acm.org \
--to=mattiase@acm.org \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
/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.