Subject: bug#44854: [PATCH] Add lexical-binding cookie to autoload files

From: Stefan Kangas <[email-masked]>
Date: Wed, 25 Nov 2020 16:07:19 -0500

Eli Zaretskii <[email-masked]> writes:

>> 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?

Footnotes:
[1] This also doubles as a hack to make this task more fun: there is
    actual science saying that human beings enjoy seeing numbers
    increase or go down.  Lars has been doing something similar with
    triaging bugs. :-)

     https://lars.ingebrigtsen.no/2020/10/26/5x10/