From c6a61b9b2c04b081477ddfc755d312d09d3a0ac5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Mar 2017 04:05:17 -0400 Subject: [PATCH] core-os: add exec-path failsafe --- core/core-os.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/core-os.el b/core/core-os.el index 20dbf43ce..728e46807 100644 --- a/core/core-os.el +++ b/core/core-os.el @@ -31,12 +31,13 @@ (cond ((display-graphic-p) ;; `exec-path-from-shell' is slow, so bring out the cache (setq exec-path - (eval-when-compile - (require 'exec-path-from-shell nil t) - (nconc exec-path-from-shell-variables '("GOPATH" "GOROOT" "PYTHONPATH")) - (exec-path-from-shell-initialize) - (persistent-soft-store 'exec-path exec-path "emacs") - exec-path))) + (or (eval-when-compile + (when (require 'exec-path-from-shell nil t) + (nconc exec-path-from-shell-variables '("GOPATH" "GOROOT" "PYTHONPATH")) + (exec-path-from-shell-initialize) + (persistent-soft-store 'exec-path exec-path "emacs") + exec-path)) + exec-path))) (t (when (require 'osx-clipboard nil t) (osx-clipboard-mode +1))))