From unknown Fri Aug 15 14:17:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20763 <20763@debbugs.gnu.org> To: bug#20763 <20763@debbugs.gnu.org> Subject: Status: 24.3.1; eval-buffer ignores lexical-binding in file local variables list Reply-To: bug#20763 <20763@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:17:32 +0000 retitle 20763 24.3.1; eval-buffer ignores lexical-binding in file local var= iables list reassign 20763 emacs submitter 20763 Tim Perkins severity 20763 minor tag 20763 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 07 13:57:22 2015 Received: (at submit) by debbugs.gnu.org; 7 Jun 2015 17:57:22 +0000 Received: from localhost ([127.0.0.1]:44234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1eoz-0000qn-E0 for submit@debbugs.gnu.org; Sun, 07 Jun 2015 13:57:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52013) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1eKn-0008Vj-PF for submit@debbugs.gnu.org; Sun, 07 Jun 2015 13:26:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1eKh-00051B-K3 for submit@debbugs.gnu.org; Sun, 07 Jun 2015 13:26:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_20, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1eKh-000517-GZ for submit@debbugs.gnu.org; Sun, 07 Jun 2015 13:26:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1eKg-0002hU-MX for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 13:26:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1eKf-00050x-PK for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 13:26:02 -0400 Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:34151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1eKf-00050t-LB for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 13:26:01 -0400 Received: by oigz2 with SMTP id z2so17213677oig.1 for ; Sun, 07 Jun 2015 10:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=qpGtDI/W2ZCdYsDPqjtmp6RE+23rM8yOzUguUg1XHJE=; b=i8x+FAGCxqEp11JktlpIvRvJSl++TbVZQh/RP+sBH3ipo2PdNIlqOEVyoDv32FCZo9 LA1AVdxfYheq9KpGRfc2sdPkzVSPra6L/F41MPBonSjcuaE9bepp/4AdSyTgXnQr9P2D MXL5DqioBNLz7UJ4zICQAM4Z4PNgeW1KvwSITEKApLTNuOpiDILVfo4tYk6jTuUPYwb/ izGCZu15sxp6jae3LepTgIoYQTcZG1fS4H57tsYDZiX1ttuvA8MYCNp7zdeXnJ3cg1sc a8R29AtfzTDiiWUqScSi7B4tYisFSeXuk2tqBtw8I5snGODHsuuyzc7U89akaQVDVzfy 2ISA== MIME-Version: 1.0 X-Received: by 10.202.67.10 with SMTP id q10mr10961826oia.124.1433697960949; Sun, 07 Jun 2015 10:26:00 -0700 (PDT) Received: by 10.202.83.4 with HTTP; Sun, 7 Jun 2015 10:26:00 -0700 (PDT) Date: Sun, 7 Jun 2015 13:26:00 -0400 Message-ID: Subject: 24.3.1; eval-buffer ignores lexical-binding in file local variables list From: Tim Perkins To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a113dd5daad7fa50517f0d12d X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 07 Jun 2015 13:57:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --001a113dd5daad7fa50517f0d12d Content-Type: text/plain; charset=UTF-8 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 --001a113dd5daad7fa50517f0d12d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Doing a M-x eval-buffer on a file containing this:
(funcall
=C2=A0(let ((a 0))
=C2=A0=C2=A0 (lambda ()
=C2=A0=C2= =A0=C2=A0=C2=A0 a)))

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

Will result in an error:

funcall: Symbol&= #39;s value as variable is void: a

But a file containing = this:

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

(funcall
=C2=A0(let ((= a 0))
=C2=A0=C2=A0 (lambda ()
=C2=A0=C2=A0=C2=A0=C2=A0 a)))

Will work as expected. No problem.

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

Seems r= elated 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 mom= ent. Dpkg reports 24.3+1-2ubuntu1.)

-- Tim
--001a113dd5daad7fa50517f0d12d-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 07 14:02:29 2015 Received: (at 20763) by debbugs.gnu.org; 7 Jun 2015 18:02:29 +0000 Received: from localhost ([127.0.0.1]:44243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1etw-0000zb-Qx for submit@debbugs.gnu.org; Sun, 07 Jun 2015 14:02:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60144) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1etu-0000zO-HX for 20763@debbugs.gnu.org; Sun, 07 Jun 2015 14:02:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1eto-0007Kk-Fj for 20763@debbugs.gnu.org; Sun, 07 Jun 2015 14:02:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD,UNRESOLVED_TEMPLATE autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([208.118.235.10]:38469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1etn-0007KP-3M; Sun, 07 Jun 2015 14:02:19 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1Z1etm-0004Td-NF; Sun, 07 Jun 2015 14:02:18 -0400 From: Glenn Morris To: Tim Perkins Subject: Re: bug#20763: 24.3.1; eval-buffer ignores lexical-binding in file local variables list References: X-Spook: Mudslide Tsunami Warning Center Al Qaeda in the Islamic X-Ran: \9ra6bfAj>&u+}U8O5}>W%`ZpqD:|v!c0c(}%%XSB (Tim Perkins's message of "Sun, 7 Jun 2015 13:26:00 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.10 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 20763 Cc: 20763@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 07 20:56:20 2015 Received: (at 20763) by debbugs.gnu.org; 8 Jun 2015 00:56:20 +0000 Received: from localhost ([127.0.0.1]:44396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1lMR-0006WG-OQ for submit@debbugs.gnu.org; Sun, 07 Jun 2015 20:56:20 -0400 Received: from mail-ob0-f177.google.com ([209.85.214.177]:35752) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1lMP-0006W1-9H for 20763@debbugs.gnu.org; Sun, 07 Jun 2015 20:56:17 -0400 Received: by obbgp2 with SMTP id gp2so65313787obb.2 for <20763@debbugs.gnu.org>; Sun, 07 Jun 2015 17:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uf9T7BQtt1hnbTozrwaPVie5JJcIoU8KI9zQQH22MKo=; b=IQlHoeN/HfrOwYb0bOEm6cy4eW49dpQpffkpruGsHkGy8gfjkme/xpjC9ArKbFeT7x 34wxiFQ45K915AvBoIsZu6RnIMkmgDc0PRF8291bQZI4IENBKOw5nzrLrQuJkqIDsRSQ JwmFNXrkfJbZSSs6wsUNgo0ZKmyH9pkxybM2JhjlF+8L1fr21jvetbyTs26La2fd4Bbm SvqN64AyT0epAJC/Nqz0y6eHr+ZoUFoC+rXaUePO3PF4yZllV8EIjw6yZEvuQisplb6h kboEVLD4v0bCHAazjmtAvqSIS7HxPkgMfvHERSsc02Y8DTsQ0EjyW+auahyXtWunk/Wv 7NPA== MIME-Version: 1.0 X-Received: by 10.60.35.42 with SMTP id e10mr12074981oej.26.1433724971707; Sun, 07 Jun 2015 17:56:11 -0700 (PDT) Received: by 10.202.83.4 with HTTP; Sun, 7 Jun 2015 17:56:11 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Jun 2015 20:56:11 -0400 Message-ID: Subject: Re: bug#20763: 24.3.1; eval-buffer ignores lexical-binding in file local variables list From: Tim Perkins To: Glenn Morris Content-Type: multipart/alternative; boundary=089e013d04eea4f40b0517f71b71 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 20763 Cc: 20763@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --089e013d04eea4f40b0517f71b71 Content-Type: text/plain; charset=UTF-8 On Sun, Jun 7, 2015 at 2:02 PM, Glenn Morris 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. --089e013d04eea4f40b0517f71b71 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Sun, Jun 7, 2015 at 2:02 PM, Glenn Morris <rgm@gnu.org> wrote:=
Unlike other file local variables, this must be set in the= first line of
=C2=A0 a file.

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

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

Thank you.
=
--089e013d04eea4f40b0517f71b71-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 10 16:50:17 2015 Received: (at control) by debbugs.gnu.org; 10 Jun 2015 20:50:17 +0000 Received: from localhost ([127.0.0.1]:49901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z2mwy-0000ed-EK for submit@debbugs.gnu.org; Wed, 10 Jun 2015 16:50:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60039) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z2mws-0000eG-Pq for control@debbugs.gnu.org; Wed, 10 Jun 2015 16:50:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2mwm-00075s-RA for control@debbugs.gnu.org; Wed, 10 Jun 2015 16:50:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2mwm-00072D-Mr for control@debbugs.gnu.org; Wed, 10 Jun 2015 16:50:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1Z2mwK-00039A-6j for control@debbugs.gnu.org; Wed, 10 Jun 2015 16:49:36 -0400 Subject: control message for bug 20763 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 10 Jun 2015 16:49:36 -0400 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) close 20763 From unknown Fri Aug 15 14:17:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 09 Jul 2015 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator