Re: Has lexical binding declaration format changed in Emacs 30 or 31?
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Feb 25, 2026 at 12:17:47PM -0500, [email protected] wrote: > Pierre Rouleau <[email protected]> writes: > > > Hi all, > > > > I started seeing the byte compiler generating the > > > > "Warning (bytecomp): file has no ‘lexical-binding’ directive on its first > > line" > > > > for files that do have the declaration. > > > > For example, the file: > > gnu-elpa-keyring-update-2025.10.1/gnu-elpa-keyring-update.el > > > > The first line of the file seems OK to me: > > > > ;;; gnu-elpa-keyring-update.el --- Update Emacs's GPG keyring for GNU ELPA > > -*- lexical-binding: t; -*- > > > > I have seen this on > > GNU Emacs 30.2.50 (build 2, aarch64-apple-darwin23.6.0, NS appkit-2487.70 > > Version 14.8.2 (Build 23J126)) of 2025-11-26 > > > > Has the format requirement changed for Emacs 30 or 31? > > See the NEWS file (C-h n) for Emacs 30: > > *** Warn about missing 'lexical-binding' directive. > The compiler now warns if an Elisp file lacks the standard > '-*- lexical-binding: ... -*-' cookie on the first line. > This line typically looks something like > > ;;; My little pony mode -*- lexical-binding: t -*- - I see a newline in the Pierre's example. I assumed it was just MUA wrapping, but worth checking anyway - Pierre's example has a semicolon after the value (i.e. t;). This should be harmless (and local testing confirms that), since it'd be a separator for more buffer-local variables, but who knows... Cheers -- t
signature.asc
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCaZ82VwAKCRAFyCz1etHa Rvn5AJ92yrKYxFHlqSHwehmBSR5M1Wo//gCfbPo/0UbunrpzSBZ+rJhWx80gPTY= =B7ku -----END PGP SIGNATURE-----