From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.bugs Subject: bug#20139: 25.0.50; eval-buffer ignores lexical-binding Date: Thu, 19 Mar 2015 10:56:37 +0100 Message-ID: <87bnjpgvje.fsf@yahoo.fr> References: <87d2466jr3.fsf@loki.jorgenschaefer.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1426759042 23496 80.91.229.3 (19 Mar 2015 09:57:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2015 09:57:22 +0000 (UTC) Cc: 20139@debbugs.gnu.org To: Jorgen =?UTF-8?Q?Sch=C3=A4fer?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 19 10:57:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YYXCR-0004M4-BY for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Mar 2015 10:57:11 +0100 Original-Received: from localhost ([::1]:38087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYXCQ-0004u0-L3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Mar 2015 05:57:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYXCO-0004tv-5U for bug-gnu-emacs@gnu.org; Thu, 19 Mar 2015 05:57:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYXCJ-0006GB-3S for bug-gnu-emacs@gnu.org; Thu, 19 Mar 2015 05:57:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYXCJ-0006G7-0B for bug-gnu-emacs@gnu.org; Thu, 19 Mar 2015 05:57:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YYXCI-0006qE-HO for bug-gnu-emacs@gnu.org; Thu, 19 Mar 2015 05:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Mar 2015 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20139-submit@debbugs.gnu.org id=B20139.142675901226282 (code B ref 20139); Thu, 19 Mar 2015 09:57:02 +0000 Original-Received: (at 20139) by debbugs.gnu.org; 19 Mar 2015 09:56:52 +0000 Original-Received: from localhost ([127.0.0.1]:52484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYXC8-0006pn-0A for submit@debbugs.gnu.org; Thu, 19 Mar 2015 05:56:52 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:15348) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYXC5-0006pe-67 for 20139@debbugs.gnu.org; Thu, 19 Mar 2015 05:56:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuEFAL+cClWkD4Xx/2dsb2JhbABchDKDDa9nAQEBAQEBBpkJAoIUAQEBAQEBfYQQAQUjVhAIAxoCBSECAg8BBEkTiBoBFLFUgWuUDwGGBwEBAQEGAQEBAR6BIYRpgi2CYIQ+MweCaIFFBZo2hnSNNCKDbz0xgkMBAQE Original-Received: from mathsrv4.ulb.ac.be (HELO localhost) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 19 Mar 2015 10:55:39 +0100 In-Reply-To: ("Jorgen \=\?utf-8\?Q\?Sch\=C3\=A4fer\=22's\?\= message of "Thu, 19 Mar 2015 08:33:52 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100655 Archived-At: Jorgen Sch=C3=A4fer writes: > . I.e. the following snippet will message (lambda nil t) and > then (closure (t) nil t): > > (with-temp-buffer > (setq lexical-binding t) > (insert "(message \"%S\" (lambda () t))") > (eval-buffer) > (eval-region (point-min) (point-max))) And this will reverse the behaviour : (with-temp-buffer (insert ";; -*- lexical-binding: t; -*-\n(message \"%S\" (lambda () t))") (eval-buffer) (eval-region (point-min) (point-max))) IOW eval-buffer obeys the "file"-local variable by calling specbind (Qlexical_binding, lisp_file_lexically_bound_p (buf) ? Qt : Qn= il); while eval-region simply uses the current value of lexical-binding. --=20 Nicolas