From 48e605a7ca8da8f129b9a69febc050084aec06e0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 1 Mar 2018 00:54:49 -0500 Subject: [PATCH] Delay exec-path-from-shell & don't omit it after byte-compile Gives users an opportunity to customize what environment variables exec-path-from-shell pulls in. May address #433 --- core/core-os.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/core-os.el b/core/core-os.el index 426b1cf40..8ced59f0d 100644 --- a/core/core-os.el +++ b/core/core-os.el @@ -34,16 +34,14 @@ (cond ((display-graphic-p) ;; A known problem with GUI Emacs on MacOS: it runs in an isolated ;; environment, so envvars will be wrong. That includes the PATH - ;; Emacs picks up. `exec-path-from-shell' fixes this. This is slow - ;; and benefits greatly from compilation. + ;; Emacs picks up. `exec-path-from-shell' fixes this. (when (require 'exec-path-from-shell nil t) (setq exec-path-from-shell-check-startup-files nil exec-path-from-shell-arguments (delete "-i" exec-path-from-shell-arguments)) - (nconc exec-path-from-shell-variables '("GOPATH" "GOROOT" "PYTHONPATH")) - (exec-path-from-shell-initialize))) - (t - (when (require 'osx-clipboard nil t) - (osx-clipboard-mode +1))))) + (defvaralias 'exec-path-from-shell-debug 'doom-debug-mode) + (add-hook 'emacs-startup-hook #'exec-path-from-shell-initialize))) + ((require 'osx-clipboard nil t) + (osx-clipboard-mode +1)))) (IS-LINUX (setq x-gtk-use-system-tooltips nil ; native tooltips are ugly!