diff --git a/flake.lock b/flake.lock index c3bc0ff..66494bc 100644 --- a/flake.lock +++ b/flake.lock @@ -8,17 +8,17 @@ ] }, "locked": { - "lastModified": 1681316393, - "narHash": "sha256-ANGyO9YyLmKKLJdvLyfCMHd7/Mfo9nmDow9YjaDWkKY=", + "lastModified": 1682187467, + "narHash": "sha256-Mh2ETdqfFLflMK1hKgxVVE3/A/4xhG10FXst+piVla4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "3655d1502e02bafa2668a74e511166ce5415c247", + "rev": "2afeb0596418d37aa3feb7203cc37a11c10c83fe", "type": "github" }, "original": { "owner": "nix-community", "repo": "emacs-overlay", - "rev": "3655d1502e02bafa2668a74e511166ce5415c247", + "rev": "2afeb0596418d37aa3feb7203cc37a11c10c83fe", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 058fa20..6030811 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ }; impermanence.url = "github:nix-community/impermanence"; emacs-overlay = { - url = "github:nix-community/emacs-overlay/3655d1502e02bafa2668a74e511166ce5415c247"; + url = "github:nix-community/emacs-overlay/2afeb0596418d37aa3feb7203cc37a11c10c83fe"; inputs.nixpkgs.follows = "nixpkgs"; }; nixgl = { diff --git a/nix/packages/emacsAccelbread.nix b/nix/packages/emacsAccelbread.nix index 5b51785..233c785 100644 --- a/nix/packages/emacsAccelbread.nix +++ b/nix/packages/emacsAccelbread.nix @@ -53,7 +53,10 @@ let ,(eglot-alternatives '("nil" "rnix-lsp" "${nil}/bin/nil"))) . ,eglot-server-programs))) ''; - baseEmacs = emacsPgtk; + baseEmacs = emacsPgtk.overrideAttrs (old: { + patches = (old.patches or [ ]) ++ + [ ./misc/0001-Revert-Better-compilation-of-arguments-to-ignore.patch ]; + }); emacsWithPackages = (emacsPackagesFor baseEmacs).emacsWithPackages; in emacsWithPackages (epkgs: attrVals configPackages epkgs diff --git a/nix/packages/misc/0001-Revert-Better-compilation-of-arguments-to-ignore.patch b/nix/packages/misc/0001-Revert-Better-compilation-of-arguments-to-ignore.patch new file mode 100644 index 0000000..03dcf8d --- /dev/null +++ b/nix/packages/misc/0001-Revert-Better-compilation-of-arguments-to-ignore.patch @@ -0,0 +1,31 @@ +From ad7d2d1d69f8c255b0e59afb3e5a369c45fa8619 Mon Sep 17 00:00:00 2001 +From: Archit Gupta +Date: Sun, 23 Apr 2023 14:16:05 -0700 +Subject: [PATCH] Revert "Better compilation of arguments to `ignore`" + +This reverts commit ea9831bb3cb4878273f6f848051c9b8c3c76d5f1. +--- + lisp/emacs-lisp/bytecomp.el | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el +index c84c70971b3..fd0c101146c 100644 +--- a/lisp/emacs-lisp/bytecomp.el ++++ b/lisp/emacs-lisp/bytecomp.el +@@ -4448,8 +4448,11 @@ This function is never called when `lexical-binding' is nil." + + (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.39.2 +