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 17:49:32 -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.
> so it did what the author thought it did:-)

Good!

>>> 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.

*scratch* is actually similar to `ielm`, tho without the prompt and using
"newline" instead of "return" ;-)

> 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)

Ah, names!

> 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?

There's no really satisfactory way to do it, but I use

    ;; -*- lexical-binding:t -*-


-- Stefan




reply via email to

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