Make 'python-shell--with-environment' respect buffer-local vars
* lisp/progmodes/python.el (python-shell--with-environment): Make `with-temp-buffer' respect buffer-local values of `process-environment' and `exec-path', if set. (Bug#72849)
This commit is contained in:
parent
e27849ecf6
commit
5fd75133cf
1 changed files with 5 additions and 5 deletions
|
@ -3030,11 +3030,11 @@ machine then modifies `tramp-remote-process-environment' and
|
|||
(tramp-dissect-file-name default-directory 'noexpand)))))
|
||||
(if vec
|
||||
(python-shell--tramp-with-environment vec extraenv bodyfun)
|
||||
(let ((process-environment
|
||||
(append extraenv process-environment))
|
||||
(exec-path
|
||||
;; FIXME: This is still Python-specific.
|
||||
(python-shell-calculate-exec-path)))
|
||||
(cl-letf (((default-value 'process-environment)
|
||||
(append extraenv process-environment))
|
||||
((default-value 'exec-path)
|
||||
;; FIXME: This is still Python-specific.
|
||||
(python-shell-calculate-exec-path)))
|
||||
(funcall bodyfun)))))
|
||||
|
||||
(defun python-shell--tramp-with-environment (vec extraenv bodyfun)
|
||||
|
|
Loading…
Add table
Reference in a new issue