From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Can't M-x compile-defun `edebug' because dynamic variables are falsely taken as lexical.
Date: Thu, 5 Jan 2017 10:54:27 +0000 [thread overview]
Message-ID: <20170105105426.GB3835@acm.fritz.box> (raw)
In-Reply-To: <jwvlguqcvs2.fsf-monnier+gmane.emacs.devel@gnu.org>
Hello, Stefan.
On Wed, Jan 04, 2017 at 05:26:53PM -0500, Stefan Monnier wrote:
> >> In which context do you need/want to do that (I ask because how to do
> >> it (and even if it can be done) depends on the details)?
> > I honestly don't know. I presume that there will be code (other than
> > the byte compiler) which will want to make a distinction.
> There might, indeed, but it's very rare: in most cases rather than
> determining which kind of binding will happen, you want to decide/impose
> which binding will happen.
OK.
> I'm not sure how Common-Lip handles it, but AFAICT there is no
> equivalent to special-variable-p there, so they don't seem to offer
> a way to find out whether a binding will be lexical or dynamic.
> > After (defvar foo), the byte compiler seems able to handle foo as
> > a dynamic variable. I'm still trying to figure out how,
> The byte-compiler *sees* the defvar, which lets it keep a note
> internally (in a data-structure which keeps track of the current
> context, which also includes information about which vars that are
> let-bound in the surrounding code were bound lexically, so as to know
> when we see a reference to var `foo' whether we should look for `foo' in
> the dynamic context or in the lexical context (and if so, where in that
> context)).
Thanks, I'll have a look at that sometime.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2017-01-05 10:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 14:14 Can't M-x compile-defun `edebug' because dynamic variables are falsely taken as lexical Alan Mackenzie
2017-01-03 18:35 ` Stefan Monnier
2017-01-03 21:32 ` Alan Mackenzie
2017-01-03 21:48 ` Stefan Monnier
2017-01-04 13:39 ` Alan Mackenzie
2017-01-04 15:23 ` Stefan Monnier
2017-01-04 20:04 ` Alan Mackenzie
2017-01-04 21:49 ` Stefan Monnier
2017-01-04 22:02 ` Alan Mackenzie
2017-01-04 22:26 ` Stefan Monnier
2017-01-04 22:44 ` Drew Adams
2017-01-05 10:54 ` Alan Mackenzie [this message]
2020-02-13 16:42 ` Drew Adams
2020-02-13 20:02 ` Stefan Monnier
2020-02-13 20:43 ` Drew Adams
2020-02-13 22:09 ` Stefan Monnier
2020-02-14 1:07 ` Drew Adams
2020-02-14 2:24 ` Stefan Monnier
2020-02-14 17:25 ` Drew Adams
2020-02-14 19:19 ` Stefan Monnier
2020-02-17 18:23 ` Drew Adams
2020-02-13 22:11 ` Stefan Monnier
2020-02-14 1:13 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170105105426.GB3835@acm.fritz.box \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.