Fedora Account System
Red Hat Associate
Red Hat Customer
Emacs started to open a warning buffer at the startup time which contains: ⛔ Warning (files): Missing ‘lexical-binding’ cookie in "/usr/share/emacs/site-lisp/site-start.d/rpmdev-init.el". Reproducible: Always Steps to Reproduce: 1.run emacs -q with rpmdevtools installed 2. 3. Actual Results: warning buffer is shown Expected Results: no warning buffer
There's a partial workaround in https://src.fedoraproject.org/rpms/rpmdevtools/pull-request/14, in that it allows one to uninstall rpmdev-init.el without uninstalling the rest of rpmdevtools.
rpmdevtools: rpmdev-init.el lacks lexical-binding cookie, Emacs 30+ warns at every startup Description of problem: /usr/share/emacs/site-lisp/site-start.d/rpmdev-init.el has no "lexical-binding" file-local variable cookie. Since Emacs 30, loading an Elisp file without the cookie emits a warning, and because this file is in site-start.d it is loaded on every Emacs startup, so every user who has rpmdevtools installed sees: Warning (files): Missing 'lexical-binding' cookie in "/usr/share/emacs/site-lisp/site-start.d/rpmdev-init.el". The file is part of the upstream rpmdevtools tarball, so this may need forwarding to https://pagure.io/rpmdevtools. Version-Release number of selected component: rpmdevtools-9.6-15.fc45.noarch emacs-common-31.1-8.fc45.aarch64 How reproducible: Always Steps to Reproduce: 1. dnf install emacs rpmdevtools 2. Start Emacs normally (not with -Q, which skips site-start) 3. Look at the *Warnings* buffer Actual results: A "Missing 'lexical-binding' cookie" warning for rpmdev-init.el is shown at every startup. Expected results: No warning. Additional info: Adding a first line is enough: ;;; rpmdev-init.el --- rpmdevtools integration for rpm-spec-mode -*- lexical-binding: t; -*- Lexical binding changes no behavior here: the only let-binding (`packager' in rpmdev-init-packager) is purely local, and the rpmdev-packager-* variables are declared with defvar. With the cookie added, Emacs 31.1 byte-compiles the file with only two warnings, both present without the cookie too: Warning: reference to free variable 'rpm-spec-user-mail-address' Warning: reference to free variable 'rpm-spec-user-full-name' Free variable references stay dynamic under lexical binding, so these are harmless; adding (defvar rpm-spec-user-mail-address) (defvar rpm-spec-user-full-name) near the top would silence them as well.