emacs-devel
[Top][All Lists]
Advanced

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

Re: thunk.el: Document that thunk-force == funcall?


From: Stefan Monnier
Subject: Re: thunk.el: Document that thunk-force == funcall?
Date: Wed, 18 Nov 2020 09:04:31 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> (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&macroexpanded from that buffer.

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.

> how to turn the *scratch* buffer to lexical binding?

By hitting C-j after the above line, for example ;-)

>    ;;; -*- lexical-binding: t -*-
> at the beginning of a buffer.
> does this do what i think it does, i.e. switch to lexical binding for
> the entire buffer?

Yes, that's the recommended way.


        Stefan




reply via email to

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