Subject: 30.0.50; No lexical-binding directive warning in -pkg.el files

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 19 Dec 2023 22:49:22 +0100

Severity: minor

0. cd "$(mktemp -d)"
1. HOME="${PWD}" XDG_CONFIG_HOME="${PWD}/.config" emacs
2. M-x package-install RET rbit RET
3. C-x b *Compile-Log* RET

In toplevel form:
rbit-pkg.el:1:1: Warning: file has no ‘lexical-binding’ directive on its first
    line

I wasn't sure about this one:

- OT1H the warning wouldn't crop up if byte-compile-file checked
  no-byte-compile before it checks lexical-binding, or if
  package--compile added -pkg.el files to the ignore list

- OTOH which dialect an Elisp file is written in (and our push for
  having this specified everywhere by default) is generally orthogonal
  to whether it should be byte-compiled

- OT3H -pkg.el files are arguably plain .eld files for which specifying
  lexical-binding makes little sense

WDYT?  Couple of sample patches to follow.

Thanks,
-- 
Basil

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.0, Xaw3d scroll bars) of 2023-12-19 built on tia
Repository revision: 7c1c2519167d51931a5d17f27529c8c8358c7c61
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101009
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure 'CFLAGS=-Og -ggdb3' -C --prefix=/home/blc/.local
 --enable-checking=structs --without-native-compilation
 --with-file-notification=yes --with-x-toolkit=lucid --with-x'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XINPUT2 XPM
LUCID ZLIB

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: elisp-compile

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug ert ewoc debug backtrace help-mode
find-func pcase warnings compile comint ansi-osc ansi-color ring
rbit-autoloads loaddefs-gen lisp-mnt radix-tree cus-edit pp cus-start
cus-load icons wid-edit mm-archive message sendmail yank-media dired
dired-loaddefs rfc822 mml mml-sec epa derived gnus-util
text-property-search time-date mailabbrev gmm-utils mailheader mm-decode
mm-bodies mm-encode mail-utils gnutls network-stream url-cache url-http
url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm puny epg rfc6068 epg-config finder-inf package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache
json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)

Memory information:
((conses 16 136237 15260) (symbols 48 11969 6) (strings 32 44639 1179)
 (string-bytes 1 1150536) (vectors 16 21515)
 (vector-slots 8 263985 21000) (floats 8 39 77) (intervals 56 408 0)
 (buffers 992 12))