From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Most of Elisp lacks lexical-binding: t Date: Mon, 04 Feb 2019 16:54:04 -0500 Message-ID: References: <15a15e1c-c44b-b978-82f0-7bbb6b1b8ff1@googlemail.com> <20190202145423.GB1067@ACM> <87y36vzrhl.fsf@russet.org.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="15737"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 04 22:54:17 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqmC1-000406-61 for ged-emacs-devel@m.gmane.org; Mon, 04 Feb 2019 22:54:17 +0100 Original-Received: from localhost ([127.0.0.1]:49924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqmC0-0000qr-60 for ged-emacs-devel@m.gmane.org; Mon, 04 Feb 2019 16:54:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqmBt-0000qO-SG for emacs-devel@gnu.org; Mon, 04 Feb 2019 16:54:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqmBs-00089x-PD for emacs-devel@gnu.org; Mon, 04 Feb 2019 16:54:09 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:35433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqmBs-00089B-0m for emacs-devel@gnu.org; Mon, 04 Feb 2019 16:54:08 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x14Ls4Bt002536; Mon, 4 Feb 2019 16:54:05 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A6E5C6AB09; Mon, 4 Feb 2019 16:54:04 -0500 (EST) In-Reply-To: <87y36vzrhl.fsf@russet.org.uk> (Phillip Lord's message of "Mon, 04 Feb 2019 12:07:50 +0000") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6475=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6475> : inlines <7011> : streams <1812095> : uri <2790861> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232973 Archived-At: > The question is, though, at what point does it become the default? IIUC Eli is not in a hurry to see it become the default. > One answer would be, support a "dynamic-binding" cookie line for > Emacs-27 (which does nothing by default), You can already use -*- lexical-binding:nil -*- for that. > incorporate your lexical-binding hack as an option. > Then, go to lexical by default for Emacs-28. This sounds rather optimistic to me. We should at least start by giving some warnings from the byte-compiler when compiling am Elisp file without lexical-binding. Maybe same thing when visiting an Elisp file. There are also all the calls to `eval` which currently tend to mostly still use dynamic binding (even in files labeled with lexical-binding:t). E.g. we could advertise `eval` as taking a minimum of 2 args so the byte-compiler would start warning about calls that don't explicitly request lexical or dynamic binding (and hence fall back to the default dynamic binding). Stefan