Fix #5038: sandbox redefining comp var aliases

Closes #5040
This commit is contained in:
Henrik Lissner 2021-05-11 21:28:14 -04:00
parent 80295728d8
commit 87d15700bd
2 changed files with 13 additions and 14 deletions

View File

@ -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.

View File

@ -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\\'")