That returns the list(lambda () VAL-X), where VAL-X is the value of variable x. And a lambda list is interpreted by Emacs as a function.
2
Stefan
On
The better solution is to add
;; -*- lexical-binding:t -*-
at the beginning of your file. Once you've done that, writing (lambda () x) is all it takes, since Emacs will then take care of replacing that x with the value from the scope surrounding that lambda (i.e. will create a proper closure).
Remove the
eval. Just`(lambda () ,x).That returns the list
(lambda () VAL-X), whereVAL-Xis the value of variablex. And a lambda list is interpreted by Emacs as a function.