Subject: Re: bug#74145: 31.0.50; Default lexical-binding to t

From: Richard Stallman <[email-masked]>
Date: Thu, 20 Feb 2025 07:03:07 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > The difference between the two, for users, is whether they need

  >     (set-default-toplevel-value 'lexical-binding t)

  > to get the new setup or

  >     (set-default-toplevel-value 'lexical-binding nil)

  > to continue with the old setup.

That is the crucial point at which the change becomes incompatible and
causes old files to break.

I suggest we make this process smoother by giving users a warning on
loading a file that fails to specify `lexical-binding' locally.

If `warn-unset-lexical-bindng' is t (which would be the default),
those warnings would be issued.  If it is nil, there would be no
warning.

Meanwhile, the default value of `lexical-binding' would control the
behavior of variable binding when the file does not specify that,
just as now.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)