GNU bug report logs - #20763
24.3.1; eval-buffer ignores lexical-binding in file local variables list

Previous Next

Package: emacs;

Reported by: Tim Perkins <tprk77 <at> gmail.com>

Date: Sun, 7 Jun 2015 17:58:02 UTC

Severity: minor

Tags: notabug

Found in version 24.3.1

Done: Glenn Morris <rgm <at> gnu.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 20763 in the body.
You can then email your comments to 20763 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#20763; Package emacs. (Sun, 07 Jun 2015 17:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tim Perkins <tprk77 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 07 Jun 2015 17:58:02 GMT) Full text and rfc822 format available.

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

From: Tim Perkins <tprk77 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.1;
 eval-buffer ignores lexical-binding in file local variables list
Date: Sun, 7 Jun 2015 13:26:00 -0400
[Message part 1 (text/plain, inline)]
Doing a M-x eval-buffer on a file containing this:

(funcall
 (let ((a 0))
   (lambda ()
     a)))

;; Local Variables:
;; lexical-binding: t
;; End:

Will result in an error:

funcall: Symbol's value as variable is void: a

But a file containing this:

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

(funcall
 (let ((a 0))
   (lambda ()
     a)))

Will work as expected. No problem.

I was expecting these these to be equivalent. I checked the manual,
"Specifying File Variables" and that seems to say that using either the
first line or variable list should have the same effect.

Seems related to #15070 and #20139.

(I'm not sure about the exact version of Emacs. It's probably old, I'm on
Ubuntu 14.04 at the moment. Dpkg reports 24.3+1-2ubuntu1.)

-- Tim
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20763; Package emacs. (Sun, 07 Jun 2015 18:03:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Tim Perkins <tprk77 <at> gmail.com>
Cc: 20763 <at> debbugs.gnu.org
Subject: Re: bug#20763: 24.3.1;
 eval-buffer ignores lexical-binding in file local variables list
Date: Sun, 07 Jun 2015 14:02:18 -0400
Tim Perkins wrote:

> ;; Local Variables:
> ;; lexical-binding: t
> ;; End:
>
> Will result in an error:

C-h v lexical-binding

  Unlike other file local variables, this must be set in the first line of
  a file.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20763; Package emacs. (Mon, 08 Jun 2015 00:57:02 GMT) Full text and rfc822 format available.

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

From: Tim Perkins <tprk77 <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 20763 <at> debbugs.gnu.org
Subject: Re: bug#20763: 24.3.1; eval-buffer ignores lexical-binding in file
 local variables list
Date: Sun, 7 Jun 2015 20:56:11 -0400
[Message part 1 (text/plain, inline)]
On Sun, Jun 7, 2015 at 2:02 PM, Glenn Morris <rgm <at> gnu.org> wrote:

> Unlike other file local variables, this must be set in the first line of
>   a file.
>

Then please disregard this bug! My mistake, I think I might have skimmed
over that part.

(I'm still kind of wondering why lexical-binding is an oddball like this,
but anyway...)

Thank you.
[Message part 2 (text/html, inline)]

bug closed, send any further explanations to 20763 <at> debbugs.gnu.org and Tim Perkins <tprk77 <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 10 Jun 2015 20:51: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. (Thu, 09 Jul 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 39 days ago.

Previous Next


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