From 87d15700bd0930a7844ead9a1a8ccc27752378bf Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 May 2021 21:28:14 -0400 Subject: [PATCH] Fix #5038: sandbox redefining comp var aliases Closes #5040 --- core/autoload/sandbox.el | 23 +++++++++++------------ core/core.el | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/core/autoload/sandbox.el b/core/autoload/sandbox.el index 12ced2221..d243e09c0 100644 --- a/core/autoload/sandbox.el +++ b/core/autoload/sandbox.el @@ -81,17 +81,6 @@ (setq package--init-file-ensured t package-user-dir ,package-user-dir package-archives ',package-archives) - ;; comp.el - (if (boundp 'comp-deferred-compilation) - ;; REVIEW Remove me after a month - (setq comp-deferred-compilation nil - comp-deferred-compilation-deny-list ',(bound-and-true-p native-comp-async-env-modifier-form) - comp-async-env-modifier-form ',(bound-and-true-p native-comp-async-env-modifier-form) - comp-eln-load-path ',(bound-and-true-p native-comp-eln-load-path)) - (setq native-comp-deferred-compilation nil - native-comp-deferred-compilation-deny-list ',(bound-and-true-p native-comp-async-env-modifier-form) - native-comp-async-env-modifier-form ',(bound-and-true-p native-comp-async-env-modifier-form) - native-comp-eln-load-path ',(bound-and-true-p native-comp-eln-load-path))) ;; (add-hook 'kill-emacs-hook ;; (lambda () ;; (delete-file user-init-file) @@ -132,7 +121,17 @@ (--run--))) (`vanilla ; nothing loaded `(progn - (package-initialize) + (if (boundp 'comp-deferred-compilation) + ;; REVIEW Remove me after a month + (setq comp-deferred-compilation nil + comp-deferred-compilation-deny-list ',(bound-and-true-p native-comp-async-env-modifier-form) + comp-async-env-modifier-form ',(bound-and-true-p native-comp-async-env-modifier-form) + comp-eln-load-path ',(bound-and-true-p native-comp-eln-load-path)) + (setq native-comp-deferred-compilation nil + native-comp-deferred-compilation-deny-list ',(bound-and-true-p native-comp-async-env-modifier-form) + native-comp-async-env-modifier-form ',(bound-and-true-p native-comp-async-env-modifier-form) + native-comp-eln-load-path ',(bound-and-true-p native-comp-eln-load-path))) + (package-initialize t) (--run--)))) ;; Then rerun Emacs' startup hooks to simulate a fresh Emacs session, ;; because they've already fired. diff --git a/core/core.el b/core/core.el index 8503c0f94..9756ec876 100644 --- a/core/core.el +++ b/core/core.el @@ -153,7 +153,7 @@ users).") ;; ;;; Native Compilation support (http://akrl.sdf.org/gccemacs.html) -;; REVIEW Remove after a couple months +;; REVIEW Remove after a month (when (boundp 'comp-deferred-compilation) (defvaralias 'native-comp-deferred-compilation 'comp-deferred-compilation) (defvaralias 'native-comp-deferred-compilation-deny-list 'comp-deferred-compilation-deny-list) @@ -181,7 +181,7 @@ users).") (with-eval-after-load 'comp ;; HACK Disable native-compilation for some troublesome packages - (mapc (apply-partially #'add-to-list 'comp-deferred-compilation-deny-list) + (mapc (apply-partially #'add-to-list 'native-comp-deferred-compilation-deny-list) (let ((local-dir-re (concat "\\`" (regexp-quote doom-local-dir)))) (list (concat "\\`" (regexp-quote doom-autoloads-file) "\\'") (concat local-dir-re ".*/evil-collection-vterm\\.el\\'")