From d6772c6c105d28dcd1f7763aa507b9cdddee249c Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Tue, 23 Jan 2024 13:01:02 -0800 Subject: [PATCH] Try removing the bytecomp-revert.patch --- overlays/bytecomp-revert.patch | 30 ------------------------------ overlays/emacs.nix | 16 ++-------------- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 overlays/bytecomp-revert.patch diff --git a/overlays/bytecomp-revert.patch b/overlays/bytecomp-revert.patch deleted file mode 100644 index b4222b4aa..000000000 --- a/overlays/bytecomp-revert.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el -index 6c5051d70c4..a0063cbef7b 100644 ---- a/lisp/emacs-lisp/bytecomp.el -+++ b/lisp/emacs-lisp/bytecomp.el -@@ -3570,8 +3570,6 @@ byte-compile-form - (setq form (cons 'progn (cdr form))) - (setq handler #'byte-compile-progn)) - ((and (or sef (function-get (car form) 'important-return-value)) -- ;; Don't warn for arguments to `ignore'. -- (not (eq byte-compile--for-effect 'for-effect-no-warn)) - (byte-compile-warning-enabled-p - 'ignored-return-value (car form))) - (byte-compile-warn-x -@@ -4515,8 +4513,11 @@ byte-compile-goto-if - - (defun byte-compile-ignore (form) - (dolist (arg (cdr form)) -- ;; Compile each argument for-effect but suppress unused-value warnings. -- (byte-compile-form arg 'for-effect-no-warn)) -+ ;; Compile args for value (to avoid warnings about unused values), -+ ;; emit a discard after each, and trust the LAP peephole optimiser -+ ;; to annihilate useless ops. -+ (byte-compile-form arg) -+ (byte-compile-discard)) - (byte-compile-form nil)) - - ;; Return the list of items in CONDITION-PARAM that match PRED-LIST. --- -2.42.0 - diff --git a/overlays/emacs.nix b/overlays/emacs.nix index afe0cc8f4..67cbcd7db 100644 --- a/overlays/emacs.nix +++ b/overlays/emacs.nix @@ -92,24 +92,12 @@ let # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments maybeOverridden = if (super.lib.hasAttr "treeSitter" base || super.lib.hasAttr "withTreeSitter" base) then base.override { withTreeSitter = true; } else base; in - maybeOverridden.overrideAttrs ( - oa: { - patches = oa.patches ++ [ - # XXX: #318 - ./bytecomp-revert.patch - ]; } - ); + maybeOverridden; emacs-pgtk = let base = super.lib.makeOverridable (mkGitEmacs "emacs-pgtk" ../repos/emacs/emacs-master.json) { withSQLite3 = true; withWebP = true; withPgtk = true; }; # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments maybeOverridden = if (super.lib.hasAttr "treeSitter" base || super.lib.hasAttr "withTreeSitter" base) then base.override { withTreeSitter = true; } else base; - in maybeOverridden.overrideAttrs ( - oa: { - patches = oa.patches ++ [ - # XXX: #318 - ./bytecomp-revert.patch - ]; } - ); + in maybeOverridden; emacs-unstable = let base = super.lib.makeOverridable (mkGitEmacs "emacs-unstable" ../repos/emacs/emacs-unstable.json) { withSQLite3 = true; withWebP = true; }; # TODO: remove when we drop support for < 23.05, and instead move withTreeSitter to the above line with the other arguments