Skip exec-path-from-shell when use-package missing
This commit is contained in:
parent
8be7ec47a0
commit
7769b6f4c7
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user