emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Adding threads to Eshell


From: Stefan Monnier
Subject: Re: [RFC] Adding threads to Eshell
Date: Fri, 16 Dec 2022 22:40:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> I suppose I mean *local* bindings, really.

I must admit that I don't know what is "a local binding".
More specifically, I believe it is a term that can mean many different
things in many different contexts.

>   (let ((some-defvar t))
>     (eshell-command "echo $some-defvar"))

If `eshell-command` is a macro which turns "echo $some-defvar" into
a chunk of ELisp with a reference to a `some-defvar` variable, then
this var could be statically scoped and this code could work as-is
simple by virtual of `lambda` capturing that statically scoped var.
If `eshell-command` is a function then the above *cannot* work with
statically scoped `some-defvar`.

For dynamically scoped vars, then you'll need to do something like what
the `lml-closure` does, but that shouldn't be hard.

> The only bit I'm still unsure about is if there's a good (and performant)
> way to ask, "What are all the local bindings of dynamic variables?" Then,

We could potentially add such a thing (except for the "performant" part,
but I think it would be fast enough anyway), but there isn't one, no,
and it's not very easy to add one (e.g. because some of the currently
active dynamic bindings can be local to specific buffers).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]