From 7e434d311594aa6eb09e0c6d6906039f22453cab Mon Sep 17 00:00:00 2001 From: Elbek Azimov Date: Thu, 27 May 2021 07:45:41 +0500 Subject: [PATCH] In emacs 28+ the 'comp-never-optimize-function was renamed to 'native-comp-never-optimize-functions. https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=31ca1c3e81b26357692c4c2428744f7f2f153596 --- advice.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/advice.el b/advice.el index cc3c8c8..29d203b 100644 --- a/advice.el +++ b/advice.el @@ -11,7 +11,12 @@ (with-eval-after-load "comp" ;; The advice for 'kill-emacs would result in eln files being written before ;; doom would set up proper load paths - (add-to-list 'comp-never-optimize-functions 'kill-emacs)) + (when (boundp 'comp-never-optimize-functions) + ;; TODO Remove this when emacs 28 become stable. + (add-to-list 'comp-never-optimize-functions 'kill-emacs)) + (when (boundp 'native-comp-never-optimize-functions) + (add-to-list 'native-comp-never-optimize-functions 'kill-emacs)) + ) (defun nix-straight-inhibit-kill-emacs (arg) (message "[nix-doom-emacs] Inhibiting (kill-emacs)"))