From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#20640: 24.5; lexical-binding should work like a normal file-local variable Date: Sun, 21 Jun 2015 20:08:52 +0000 Message-ID: References: <55638701.9010400@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013d15d883fb1405190cba88 X-Trace: ger.gmane.org 1434917421 30623 80.91.229.3 (21 Jun 2015 20:10:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Jun 2015 20:10:21 +0000 (UTC) Cc: 20640@debbugs.gnu.org To: Stefan Monnier , Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 21 22:10:13 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 1Z6lZF-0000tM-1s for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jun 2015 22:10:13 +0200 Original-Received: from localhost ([::1]:37199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6lZD-0006hJ-RU for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Jun 2015 16:10:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6lZ9-0006eW-S4 for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2015 16:10:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6lZ6-0005X7-Lp for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2015 16:10:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6lZ6-0005WL-J8 for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2015 16:10:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z6lZ5-0000lS-V4 for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2015 16:10:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jun 2015 20:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 20640-submit@debbugs.gnu.org id=B20640.14349173522878 (code B ref 20640); Sun, 21 Jun 2015 20:10:03 +0000 Original-Received: (at 20640) by debbugs.gnu.org; 21 Jun 2015 20:09:12 +0000 Original-Received: from localhost ([127.0.0.1]:53626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z6lYF-0000kL-Mu for submit@debbugs.gnu.org; Sun, 21 Jun 2015 16:09:12 -0400 Original-Received: from mail-wi0-f176.google.com ([209.85.212.176]:32832) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z6lYC-0000k7-Io for 20640@debbugs.gnu.org; Sun, 21 Jun 2015 16:09:09 -0400 Original-Received: by wiwl6 with SMTP id l6so19831583wiw.0 for <20640@debbugs.gnu.org>; Sun, 21 Jun 2015 13:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=zbCEhCBFES9T9Ay1exreHVJqz4faS6VHTtLbwhBOoCc=; b=p4lwoe1fHn2gL9iBPTaKX5BITl4SQqTZsndN0kLKBps1sGfrxNw6m2q0JSwHqqpK5R I+3p03pIxP61QaYa+5YlGSZEKX+Kk4HtxCVLYUIB5QEP1hpzzzwW6d+9WYHMiCN6lvIN ZU2wf+O8Osm3egh5m4lXowk1AcUjmPBNp7keVGs/ehqrAtDNtaWwgk8KFa3HGLVswKWJ lEpAkKf87GzQU4lWrpgS4Nh+CAAb5vWdQWlhRSyAFVs3S/x0bIeeyTBwtDgx4HcBYyWl 9OJESbkgj+yxzyqNdYIGUGMBDMQGgJ8undKXDfWTomFu2vnjuycfo0MvRHNB29+2KTK6 KwhQ== X-Received: by 10.194.176.165 with SMTP id cj5mr45646296wjc.72.1434917343065; Sun, 21 Jun 2015 13:09:03 -0700 (PDT) In-Reply-To: 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:104192 Archived-At: --089e013d15d883fb1405190cba88 Content-Type: text/plain; charset=UTF-8 Stefan Monnier schrieb am Mi., 27. Mai 2015 um 03:49 Uhr: > > Even if the code were to check for "coding:" (which we already have to > > scan the end of the file for) and "lexical-binding:" in the same pass? > > The check for "coding:" is a misdesign, indeed. I think we should use > some utf-8 tell-tale sign at the beginning of *.el files to eliminate > the need to check for "coding:" (and to go through > load-with-code-conversion) in the normal case. It could be a utf-8 BOM > or something like that. Ideally we could give extra meaning to this > marker so it not only means "uses utf-8" but also "uses > lexical-scoping", so that we can have a future where we don't need to > add "lexical-binding:t" to every file. > > > I don't think this is a misdesign. In most cases files are either seekable or small enough so that reading the variables from the end is tolerable. I prefer the end of files for local variables because they tend to be less important than the actual content. --089e013d15d883fb1405190cba88 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Stefan= Monnier <monnier@iro.umontr= eal.ca> schrieb am Mi., 27. Mai 2015 um 03:49=C2=A0Uhr:
> Even if the code were to check for "c= oding:" (which we already have to
> scan the end of the file for) and "lexical-binding:" in the = same pass?

The check for "coding:" is a misdesign, indeed.=C2=A0 I think we = should use
some utf-8 tell-tale sign at the beginning of *.el files to eliminate
the need to check for "coding:" (and to go through
load-with-code-conversion) in the normal case.=C2=A0 It could be a utf-8 BO= M
or something like that.=C2=A0 Ideally we could give extra meaning to this marker so it not only means "uses utf-8" but also "uses
lexical-scoping", so that we can have a future where we don't need= to
add "lexical-binding:t" to every file.



I don't think this is a misdesign.= In most cases files are either seekable or small enough so that reading th= e variables from the end is tolerable. I prefer the end of files for local = variables because they tend to be less important than the actual content.= =C2=A0
--089e013d15d883fb1405190cba88--