Fedora Account System
Red Hat Associate
Red Hat Customer
Here is a sample of these errors: ■ Warning (files): Missing ‘lexical-binding’ cookie in "/usr/share/emacs/site-lisp/site-start.d/cmake-init.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. ■ Warning (files): Missing ‘lexical-binding’ cookie in "/usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.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. ■ Warning (files): Missing ‘lexical-binding’ cookie in "/usr/share/emacs/site-lisp/site-start.d/rpmdev-init.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. ■ Warning (files): Missing ‘lexical-binding’ cookie in "/usr/share/emacs/site-lisp/site-start.d/systemtap-init.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. I get these errors at startup. Reproducible: Always Steps to Reproduce: 1. start emacs. 2. Observe warnings in the *Warnings* buffer. Actual Results: emacs spews diagnostics on startup for files the user doesn't have the privileges to fix. Expected Results: emacs starts up cleanly Additional Information: elisp-enable-lexical-binding in the appropriate buffer fixes the error. I did not observe it introduce any errors in the files I modified this way.
This new warning is a deliberate change in Emacs 31 (https://www.gnu.org/software/emacs/news/NEWS.31.html#text-2-8-10). The files you list are provided by other packages, and are for them to fix. Please find the packages by running `rpm -qif` on the files, and log bugs against those packages. Feel free to mark those bugs as blocking this one, and we can keep this bug open as a tracking bug. Thanks.
An alternative approach to adding the lexical-binding cookie to affected files is to eliminate the affected files entirely, where appropriate. In Fedora 46 (rawhide at the time of writing), https://fedoraproject.org/wiki/Changes/Emacs_Package_Packaging offers a way of doing this suitable for some packages, via the new %{_emacs_package_install} macro. See case A in https://docs.fedoraproject.org/en-US/packaging-guidelines/Emacs/ for more details.
It looks to me that at least those 2524933 2535612 2591262 2591265 2591267 2591275 should appear on the "Depends On" list but I do not know how to do that.