From 441fc5115c89c87c08ee62b2311ea2a77f67153f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 21:30:25 -0500 Subject: [PATCH] Don't load user's init.el in sandbox sessions For 'C-c C-p' and 'C-c C-d', specifically. --- core/autoload/debug.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index d08efec60..43ea2444c 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -209,8 +209,10 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!" (setq-default buffer-undo-tree (make-undo-tree)))) (pcase mode (`vanilla-doom+ ; Doom core + modules - private config - `((setq doom-init-modules-p t) - (load-file ,user-init-file) + `((load-file ,(expand-file-name "core.el" doom-core-dir)) + (doom-initialize) + (doom-initialize-core) + (add-hook 'window-setup-hook #'doom-display-benchmark-h) (setq doom-modules ',doom-modules) (maphash (lambda (key plist) (let ((doom--current-module key) @@ -225,8 +227,9 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!" (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (doom-run-all-startup-hooks-h))) (`vanilla-doom ; only Doom core - `((setq doom-init-modules-p t) - (load-file ,user-init-file) + `((load-file ,(expand-file-name "core.el" doom-core-dir)) + (doom-initialize) + (doom-initialize-core) (doom-run-all-startup-hooks-h))) (`vanilla ; nothing loaded `((package-initialize)))))))