Skip exec-path-from-shell when use-package missing

This commit is contained in:
Ivan Malison 2016-08-21 22:22:19 -07:00
parent 8be7ec47a0
commit 7769b6f4c7
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -87,6 +87,8 @@ These definitions silence the byte-compiler.
** exec-path-from-shell ** exec-path-from-shell
Sets environment variables by starting a shell. Sets environment variables by starting a shell.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(eval-and-compile
(when (fboundp 'use-package)
(use-package exec-path-from-shell (use-package exec-path-from-shell
:config :config
(progn (progn
@ -94,7 +96,7 @@ Sets environment variables by starting a shell.
(add-to-list 'exec-path-from-shell-variables "GOPATH") (add-to-list 'exec-path-from-shell-variables "GOPATH")
(add-to-list 'exec-path-from-shell-variables "ENVIRONMENT_SETUP_DONE") (add-to-list 'exec-path-from-shell-variables "ENVIRONMENT_SETUP_DONE")
(add-to-list 'exec-path-from-shell-variables "PYTHONPATH") (add-to-list 'exec-path-from-shell-variables "PYTHONPATH")
(exec-path-from-shell-initialize))) (exec-path-from-shell-initialize)))))
#+END_SRC #+END_SRC
** Non-Forking Shell Command To String ** Non-Forking Shell Command To String
Emacs' built in ~shell-command-to-string~ function has the downside that it forks a new shell process every time it is executed. This means that any shell startup cost is incurred when this function is called. Emacs' built in ~shell-command-to-string~ function has the downside that it forks a new shell process every time it is executed. This means that any shell startup cost is incurred when this function is called.