From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: News from the lexical world Date: Sat, 10 Apr 2021 17:32:00 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18591"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 10 23:32:42 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVLDe-0004lX-AB for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 23:32:42 +0200 Original-Received: from localhost ([::1]:53800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVLDd-0005vO-B0 for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 17:32:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVLD8-0005VF-Ax for emacs-devel@gnu.org; Sat, 10 Apr 2021 17:32:10 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:14951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVLD5-0001Wc-7Q for emacs-devel@gnu.org; Sat, 10 Apr 2021 17:32:09 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 60B0D8089E; Sat, 10 Apr 2021 17:32:05 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0797680284; Sat, 10 Apr 2021 17:32:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1618090323; bh=Ap+BdPQsR8uoP+P92YKa92h9nP/YpT6kg5vvSQ7p6v8=; h=From:To:Subject:References:Date:In-Reply-To:From; b=VR7dsQBw0zQVb1sMbrTd7+m8Vsp37Em9ICWiWNQMB07L/upt7kWcibz/51bsDWHtw EUCIte88MUtxeEjMFf/j5HPNGuDiXVeJmlMzmp++bxK23Gci4wiLjMAtS0UgU5czB2 moOM1GqkG4BqRyAaNoe+C7nCNdrR3htCBXqiMlEjGkwDl7q/HP7MOlTu5mGzo+a6W4 ZP5El33xWVS6a6gCUM+ToVBX7DuhMHEqYzI2nX47SObqu20tpVfpIilKYfLUeYah2j zFLOu9KPKW4B8vH8fcNt8ZTDrGnkDNf/r2+WRbqvK0pMjmnG0Di7W/WOBOhVulLBFq cCSQLgRiojQhQ== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 53DE2120470; Sat, 10 Apr 2021 17:32:02 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Fri, 12 Feb 2021 11:23:13 -0500") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267836 Archived-At: Stefan Monnier [2021-02-12 11:23:13] wrote: > Sorry to interrupt your great keybindings discussion, but I'll just > point out that we have now converted to lexical-binding a bit over 80% > of Emacs's ELisp files. Things have progressed a bit since. We're now down to: 1 lisp/org/ 1 lisp/progmodes/ 2 / 2019 = 0.099058940069341253% I.e. there are only 2 files left in Emacs's ELisp codebase which come without the `lexical-binding:t` cookie. These are `org-agenda.el` (which has already been converted upstream, so we're just waiting for that code to make its way to an Org release and then to Emacs's `master`) and `verilog-mode.el` (where the situation is a good bit more delicate: verilog-mode can be used with Verilog files written specifically for verilog-mode, with embedded ELisp snippets run via `eval`, and those snippets tend to use "arbitrary" variables which happened to be bound at that time, so we're still working on a satisfactory solution, which will likely involve documenting which of those variables can be used that way, along with what they mean). This doesn't quite mean that all of Emacs's ELisp code is now using the new dialect. The old non-lexbind dialect is still used in a few cases: - There are still a fair number of calls to `eval` with a nil (or, more often, absent) second argument. - There is also still some code which builds lambda expressions "by hand" (typically via backquote or otherwise embedded inside a larger quoted piece of data) and without passing the resulting "source code expression" to `eval` (or to the byte-compiler) to turn it into a "function value". In the dynbind world those two were one and the same, but not so in the lexbind world, and a value that starts with a `lambda` will see its body evaluated using the old ELisp dialect. I welcome help updating those cases. Stefan