Subject: Re: bug#66636: Move lexical-binding warning from checkdoc to byte-compiler

From: Stefan Kangas <[email-masked]>
Date: Fri, 20 Oct 2023 12:44:21 -0700

Eli Zaretskii <[email-masked]> writes:

>> I don't think so, at least insomuch as byte-compile-warnings doesn't
>> function as a file-local variable.
>
> Then maybe we should allow that for this new warning (and potentially
> also other warnings).

If adding file local variables is an acceptable work-around, then adding
this to the .el file should be acceptable too:

    ;;; -*- lexical-binding:nil -*-

And that already works with the proposed patch.