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
This commit is contained in:
Henrik Lissner 2018-03-01 00:54:49 -05:00
parent 1758008ca5
commit 48e605a7ca
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -34,16 +34,14 @@
(cond ((display-graphic-p) (cond ((display-graphic-p)
;; A known problem with GUI Emacs on MacOS: it runs in an isolated ;; A known problem with GUI Emacs on MacOS: it runs in an isolated
;; environment, so envvars will be wrong. That includes the PATH ;; environment, so envvars will be wrong. That includes the PATH
;; Emacs picks up. `exec-path-from-shell' fixes this. This is slow ;; Emacs picks up. `exec-path-from-shell' fixes this.
;; and benefits greatly from compilation.
(when (require 'exec-path-from-shell nil t) (when (require 'exec-path-from-shell nil t)
(setq exec-path-from-shell-check-startup-files nil (setq exec-path-from-shell-check-startup-files nil
exec-path-from-shell-arguments (delete "-i" exec-path-from-shell-arguments)) exec-path-from-shell-arguments (delete "-i" exec-path-from-shell-arguments))
(nconc exec-path-from-shell-variables '("GOPATH" "GOROOT" "PYTHONPATH")) (defvaralias 'exec-path-from-shell-debug 'doom-debug-mode)
(exec-path-from-shell-initialize))) (add-hook 'emacs-startup-hook #'exec-path-from-shell-initialize)))
(t ((require 'osx-clipboard nil t)
(when (require 'osx-clipboard nil t) (osx-clipboard-mode +1))))
(osx-clipboard-mode +1)))))
(IS-LINUX (IS-LINUX
(setq x-gtk-use-system-tooltips nil ; native tooltips are ugly! (setq x-gtk-use-system-tooltips nil ; native tooltips are ugly!