From c96d13f0be30cb1fedce148f576441112b7ccdd1 Mon Sep 17 00:00:00 2001 From: Acid Bong Date: Sun, 9 Mar 2025 11:47:31 +0200 Subject: [PATCH] emacs: add `lexical-binding: t` to files, generated by emacs.pkgs.withPackages Emacs30 now complains if lexical binding isn't specified (t for modern dialects, nil for older ones[^1]) in compiled .el files. This patch prevents the warnings for `site-start.el` and `subdirs.el`. [^1]: https://www.gnu.org/software/emacs/manual/html_node/elisp/Selecting-Lisp-Dialect.html --- pkgs/applications/editors/emacs/build-support/wrapper.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/emacs/build-support/wrapper.nix b/pkgs/applications/editors/emacs/build-support/wrapper.nix index 7a844759c501..7bef6596b62a 100644 --- a/pkgs/applications/editors/emacs/build-support/wrapper.nix +++ b/pkgs/applications/editors/emacs/build-support/wrapper.nix @@ -164,6 +164,7 @@ runCommand (lib.appendToName "with-packages" emacs).name # buffer. rm -f $siteStart $siteStartByteCompiled $subdirs $subdirsByteCompiled cat >"$siteStart" <"$subdirs" < "$subdirs" + >> "$subdirs" # Byte-compiling improves start-up time only slightly, but costs nothing. $emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" "$subdirs"