Emacs 31 warns on missing lexical bindings for `generic/proof-autoloads.el`
The warning looks like this (from the *Warnings* buffer):
⛔ Warning (files): Missing ‘lexical-binding’ cookie in "~/.emacs.d/.cache/elpaca/builds/proof-general/generic/proof-autoloads.el".
You can add one with ‘M-x elisp-enable-lexical-binding RET’.
See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
for more information.
Since this is the auto-loads file, this warning shows up when I start Emacs. The warning can be addressed by adding a lexical binding cookie to the file in question. To preserve existing behavior and silence the warning, we can use:
generic/proof-autoloads.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generic/proof-autoloads.el b/generic/proof-autoloads.el
index 8090aa0..4f35a9f 100644
--- a/generic/proof-autoloads.el
+++ b/generic/proof-autoloads.el
@@ -1,4 +1,4 @@
-;;; proof-autoloads.el --- automatically extracted autoloads
+;;; proof-autoloads.el --- automatically extracted autoloads -*- lexical-binding: nil; -*-
;; This file is part of Proof General.
To preserve existing behavior and silence the warning, we can use: [...] -;;; proof-autoloads.el --- automatically extracted autoloads +;;; proof-autoloads.el --- automatically extracted autoloads -- lexical-binding: nil; --
I'd recommend using lexical-binding: t since that's more "future
looking" and it works as well because the code in that file behaves
identically regardless of the ELisp dialect chosen.
@monnier That sounds reasonable. Do you know if the file is auto-generated? I'd be happy to open a PR if I knew where the correct root change was.
@monnier That sounds reasonable. Do you know if the file is auto-generated? I'd be happy to open a PR if I knew where the correct root change was.
I think you want to look at the autoloads target in Makefile.devel.
I opened https://github.com/ProofGeneral/PG/pull/846 to address the problem.