Cache exec-path

This commit is contained in:
Henrik Lissner 2015-11-23 15:22:13 -05:00
parent 07b66708af
commit b636449605

View file

@ -23,11 +23,14 @@
;; fix emacs PATH on OSX (GUI only)
(when window-system
(setenv "SHELL" "/usr/local/bin/zsh")
(setenv "EMACS" "1") ; make sure the world knows
(setq exec-path (eval-when-compile
(require 'exec-path-from-shell)
(exec-path-from-shell-initialize)
exec-path)))
;; `exec-path-from-shell' is slow, so bring out the cache
(setq exec-path
(or (persistent-soft-fetch 'exec-path-env "osx")
(progn
(require 'exec-path-from-shell)
(exec-path-from-shell-initialize)
(persistent-soft-store 'exec-path-env exec-path "osx")
exec-path))))
;; OSX Related Plugins ;;;;;;;;;;;;;;;;;