瀏覽代碼

Update with-venv

master
10sr 5 年之前
父節點
當前提交
75fa8b67e0
簽署人: 10sr GPG 金鑰 ID: 7BEC428194130EB2
共有 1 個檔案被更改,包括 9 行新增7 行删除
  1. +9
    -7
      emacs.el

+ 9
- 7
emacs.el 查看文件

@@ -2035,13 +2035,15 @@ If dir is nil, execute BODY as usual."
(unwind-protect
(progn
(when ,dir
;; Do the same thing that bin/activate does
(setq exec-path
(cons (concat ,dir "/bin")
exec-path))
(setenv "VIRTUAL_ENV" ,dir)
(setenv "PATH" (concat ,dir "/bin:" (or (getenv "PATH") "")))
(setenv "PYTHONHOME"))
(let* ((dir (file-name-as-directory ,dir))
(bin (expand-file-name "bin" dir)))
;; Do the same thing that bin/activate does
(setq exec-path
(cons bin
exec-path))
(setenv "VIRTUAL_ENV" dir)
(setenv "PATH" (concat bin ":" (or (getenv "PATH") "")))
(setenv "PYTHONHOME")))
,@body)
(setq process-environment
--with-venv-process-environment-orig)


Loading…
取消
儲存