Skip to content

Emacs 31 warns on missing lexical bindings for generic/proof-autoloads.el #845

@iwahbe

Description

@iwahbe

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.
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions