[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: thunk.el: Document that thunk-force == funcall?
From: |
Tomas Hlavaty |
Subject: |
Re: thunk.el: Document that thunk-force == funcall? |
Date: |
Wed, 18 Nov 2020 23:19:47 +0100 |
On Wed 18 Nov 2020 at 09:04, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>>> (setq lexical-binding t)
>>> Side node: this usually doesn't do what the author thinks it does.
>> what does it do?
>
> It changes the lexical-binding mode of the buffer in which the code
> is executed, which means it will affect the code subsequently
> read¯oexpanded from that buffer.
so it did what the author thought it did:-)
> If that's inside a file that you're `load`ing, it will change the
> lexical-binding of the buffer which happens to be current when the file
> is loaded but won't affect the interpretation of the subsequent code in
> that file.
ok, i see why you thought it did not do what the authour thought it did
>> how to turn the *scratch* buffer to lexical binding?
>
> By hitting C-j after the above line, for example ;-)
i just learned about C-j, thanks.
i used eval-defun which i have bound to C-M-x. (strange that it is
called eval-defun but it actually evaluates the top-level sexp, even if
it is not defun)
i don't know how else should have i indicated, that all the code bellow
needs lexical binding.
is there a way to do that without confusing anybody, so that it does not
look like it doesn't do what the author thinks it does?
- thunk.el: Document that thunk-force == funcall?, Michael Heerdegen, 2020/11/17
- Re: thunk.el: Document that thunk-force == funcall?, Tomas Hlavaty, 2020/11/17
- Re: thunk.el: Document that thunk-force == funcall?, Michael Heerdegen, 2020/11/17
- Re: thunk.el: Document that thunk-force == funcall?, Tomas Hlavaty, 2020/11/17
- Re: thunk.el: Document that thunk-force == funcall?, Michael Heerdegen, 2020/11/17
- Re: thunk.el: Document that thunk-force == funcall?, Tomas Hlavaty, 2020/11/17
- Re: thunk.el: Document that thunk-force == funcall?, Stefan Monnier, 2020/11/17
- Re: thunk.el: Document that thunk-force == funcall?, Tomas Hlavaty, 2020/11/18
- Re: thunk.el: Document that thunk-force == funcall?, Stefan Monnier, 2020/11/18
- Re: thunk.el: Document that thunk-force == funcall?,
Tomas Hlavaty <=
- Re: thunk.el: Document that thunk-force == funcall?, Stefan Monnier, 2020/11/18
- Re: thunk.el: Document that thunk-force == funcall?, Tomas Hlavaty, 2020/11/18
- Re: thunk.el: Document that thunk-force == funcall?, Stephen Leake, 2020/11/18
Re: thunk.el: Document that thunk-force == funcall?, Alfred M. Szmidt, 2020/11/18
RE: thunk.el: Document that thunk-force == funcall?, Drew Adams, 2020/11/17