From 0199c3a3d41ec72879420f9a6ffc55ddb4f820ff Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 22 Dec 2024 13:40:49 +0800 Subject: [PATCH] Revert "emacs30: add a patch to fix upstream bug 67916" This reverts commit 5514e1e7d77c1a8b4b16e5cc7572ec2b6a411157. This resolves conflicts between staging-next and master after #367148 is merged into master. In addition, this patch does not need to go through a staging cycle. We can reapply it directly to master and it will probably reach users sooner. --- ...ibit-lexical-cookie-warning-67916-30.patch | 30 ------------------- pkgs/applications/editors/emacs/sources.nix | 3 -- 2 files changed, 33 deletions(-) delete mode 100644 pkgs/applications/editors/emacs/inhibit-lexical-cookie-warning-67916-30.patch diff --git a/pkgs/applications/editors/emacs/inhibit-lexical-cookie-warning-67916-30.patch b/pkgs/applications/editors/emacs/inhibit-lexical-cookie-warning-67916-30.patch deleted file mode 100644 index c81a0d0b94b81..0000000000000 --- a/pkgs/applications/editors/emacs/inhibit-lexical-cookie-warning-67916-30.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Lin Jian -Bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67916 - -Inhibit lexical cookie warning for *-pkg.el files (bug#67916) - -Users may use byte-compile-error-on-warn to turn compilation warnings -into errors to make sure their Emacs lisp packages are warning-free. -Emacs bug 67916 makes that difficult because the Emacs-generated file -*-pkg.el emits a compilation warning about missing lexical cookie. - -There is an upstream patch to fix this. That patch makes Emacs also -generate the needed lexical cookie when generating *-pkg.el files. -However, that patch has stalled. - -This patch takes an easier but less accurate approach by inhibiting -lexical cookie warning for *-pkg.el files. Given that not all -*-pkg.el files are generated by Emacs, to reduce impact, this patch -also checks no-byte-compile. - ---- a/lisp/emacs-lisp/bytecomp.el -+++ b/lisp/emacs-lisp/bytecomp.el -@@ -2266,6 +2266,8 @@ See also `emacs-lisp-byte-compile-and-load'." - filename buffer-file-name)) - ;; Don't inherit lexical-binding from caller (bug#12938). - (unless (or (local-variable-p 'lexical-binding) -+ (and (string-suffix-p "-pkg.el" filename) -+ (with-current-buffer input-buffer no-byte-compile)) - bytecomp--inhibit-lexical-cookie-warning) - (let ((byte-compile-current-buffer (current-buffer))) - (displaying-byte-compile-warnings diff --git a/pkgs/applications/editors/emacs/sources.nix b/pkgs/applications/editors/emacs/sources.nix index d914c6c64d455..f197a0d1d09cf 100644 --- a/pkgs/applications/editors/emacs/sources.nix +++ b/pkgs/applications/editors/emacs/sources.nix @@ -150,9 +150,6 @@ in variant = "mainline"; rev = "30.0.92"; hash = "sha256-V2TXLemSCIPTpg6RDChv4va7pHfVcqSMw/EWqvlRQ1o="; - patches = fetchpatch: [ - ./inhibit-lexical-cookie-warning-67916-30.patch - ]; }); emacs28-macport = import ./make-emacs.nix (mkArgs {