Subject: bug#15070: bug#20139: 25.0.50; eval-buffer ignores lexical-binding

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 07 Oct 2019 17:25:28 +0200

Stefan Monnier <[email-masked]> writes:

>> IOW eval-buffer obeys the "file"-local variable by calling
>>     specbind (Qlexical_binding, lisp_file_lexically_bound_p (buf) ?
>> Qt : Qnil);
>> while eval-region simply uses the current value of lexical-binding.
>
> Indeed, and I don't think we can easily change either of these.
> Jorgen, what is the original problem you're trying to solve?

So `eval-buffer' ignores the buffer-local value of `lexical-binding',
and that's a feature.  So I think we should just document that?

I've now done so in Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no