GNU bug report logs - #15070
24.3.50.1; eval-buffer ignores the buffer local value of lexical-binding.

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Sun, 11 Aug 2013 13:17:02 UTC

Severity: minor

Tags: fixed

Merged with 20139

Found in versions 24.3.50.1, 25.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15070 in the body.
You can then email your comments to 15070 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15070; Package emacs. (Sun, 11 Aug 2013 13:17:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to E Sabof <esabof <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 11 Aug 2013 13:17:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50.1;
 eval-buffer ignores the buffer local value of lexical-binding.
Date: Sun, 11 Aug 2013 14:16:11 +0100
[Message part 1 (text/plain, inline)]
In emacs -Q:

    M-: (setq lexical-binding t)

paste the following:

    (funcall
     (let ((a 5))
       (lambda ()
         a)))

M-x eval-buffer
The error (void-variable a) will be thrown.

The snippet will be evaluated correctly, only if one inserts

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

on the first line
[Message part 2 (text/html, inline)]

Merged 15070 20139. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 19 Mar 2015 15:52:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15070; Package emacs. (Mon, 07 Oct 2019 15:26:02 GMT) Full text and rfc822 format available.

Message #10 received at 15070 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Jorgen Schäfer <contact <at> jorgenschaefer.de>,
 Nicolas Richard <theonewiththeevillook <at> yahoo.fr>, 20139 <at> debbugs.gnu.org,
 15070 <at> debbugs.gnu.org
Subject: Re: bug#20139: 25.0.50; eval-buffer ignores lexical-binding
Date: Mon, 07 Oct 2019 17:25:28 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Oct 2019 15:26:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 15070 <at> debbugs.gnu.org and E Sabof <esabof <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Oct 2019 15:26:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Nov 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 145 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.