From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44854: [PATCH] Add lexical-binding cookie to autoload files Date: Thu, 26 Nov 2020 16:02:24 +0200 Message-ID: <83o8jkqkr3.fsf@gnu.org> References: <837dqatsjd.fsf@gnu.org> <83360ytqk3.fsf@gnu.org> <83wny9scmb.fsf@gnu.org> <83eekhs5sj.fsf@gnu.org> <83a6v5s3e3.fsf@gnu.org> <837dq9s12u.fsf@gnu.org> <83wny9qj0j.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26427"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44854@debbugs.gnu.org, monnier@iro.umontreal.ca To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 26 15:03:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kiHra-0006lC-Ps for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 15:03:10 +0100 Original-Received: from localhost ([::1]:47104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiHrZ-0006Xc-SZ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Nov 2020 09:03:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiHrT-0006XI-CY for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2020 09:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiHrS-0007mK-Ah for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2020 09:03:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiHrS-0005d2-6v for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2020 09:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Nov 2020 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44854-submit@debbugs.gnu.org id=B44854.160639937421623 (code B ref 44854); Thu, 26 Nov 2020 14:03:02 +0000 Original-Received: (at 44854) by debbugs.gnu.org; 26 Nov 2020 14:02:54 +0000 Original-Received: from localhost ([127.0.0.1]:40334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiHrK-0005cg-8f for submit@debbugs.gnu.org; Thu, 26 Nov 2020 09:02:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiHrJ-0005cU-GF for 44854@debbugs.gnu.org; Thu, 26 Nov 2020 09:02:53 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42465) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiHrC-0007iL-Tz; Thu, 26 Nov 2020 09:02:47 -0500 Original-Received: from [176.228.60.248] (port=2478 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kiHr8-0000UO-Sn; Thu, 26 Nov 2020 09:02:46 -0500 In-Reply-To: (message from Stefan Kangas on Wed, 25 Nov 2020 16:07:19 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194322 Archived-At: > From: Stefan Kangas > Date: Wed, 25 Nov 2020 16:07:19 -0500 > Cc: 44854@debbugs.gnu.org > > >> I was not discussing specifically `loaddefs.el`. > >> The reason to change it in `loaddefs.el` now rather than later is > >> because I can't see any benefit to doing it later. > > > > That's not a reason good enough in my book, sorry. > > FWIW, I have been working towards this crude metric: > > find -iname "*.el" -exec egrep -L "lexical-binding: *t" {} \; | wc -l > > This gives some indicator for how ready we are to "flip the switch". An > even better metric would of course be possible, for example by counting > SLOC or making it ignore files with side-effect free statements. But it > hasn't seemed worth the trouble. > > Also, the above metric can easily be converted to a TODO-list: > > find -iname "*.el" -exec egrep -L "lexical-binding: *t" {} \; | sort > > This is how I've been using it. I've been looking to make the number of > files go down by adding the cookie to even insignificant files, as they > stand in the way of seeing the files that actually need work.[1] > > May I ask why you are against it? If we agree that it should make no > difference one way or the other, why not just do it? I have nothing against converting Lisp files to lexical-binding, and have never objected to any of your recent changes in that direction. But this makes sense only in files which be affected by that, and autoloads files aren't. "Converting" them to lexical-binding, and modifying the code which produces those files on top of that, sounds like we are afraid of our own shadows, or don't know what lexical-binding is about (or both). My point is that when the time comes to "flip the switch", we can do that without having lexical-binding in autoloads files. They cannot be affected by the switch. If they are, it's probably some subtle bug somewhere.