diff options
| author | Evgenii Klimov | 2024-08-29 23:36:12 +0100 |
|---|---|---|
| committer | Eli Zaretskii | 2024-08-31 13:16:42 +0300 |
| commit | 5fd75133cfe389004f9fca8f11e093e531c45fe2 (patch) | |
| tree | bf743f823e69ff1d460e36f1260f86d88255c106 /lisp/progmodes/python.el | |
| parent | e27849ecf6ee01f6d02ef2785d0c10e32bc764e9 (diff) | |
| download | emacs-5fd75133cfe389004f9fca8f11e093e531c45fe2.tar.gz emacs-5fd75133cfe389004f9fca8f11e093e531c45fe2.zip | |
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)
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 227be64b5b0..a50446343a0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -3030,11 +3030,11 @@ machine then modifies `tramp-remote-process-environment' and | |||
| 3030 | (tramp-dissect-file-name default-directory 'noexpand))))) | 3030 | (tramp-dissect-file-name default-directory 'noexpand))))) |
| 3031 | (if vec | 3031 | (if vec |
| 3032 | (python-shell--tramp-with-environment vec extraenv bodyfun) | 3032 | (python-shell--tramp-with-environment vec extraenv bodyfun) |
| 3033 | (let ((process-environment | 3033 | (cl-letf (((default-value 'process-environment) |
| 3034 | (append extraenv process-environment)) | 3034 | (append extraenv process-environment)) |
| 3035 | (exec-path | 3035 | ((default-value 'exec-path) |
| 3036 | ;; FIXME: This is still Python-specific. | 3036 | ;; FIXME: This is still Python-specific. |
| 3037 | (python-shell-calculate-exec-path))) | 3037 | (python-shell-calculate-exec-path))) |
| 3038 | (funcall bodyfun))))) | 3038 | (funcall bodyfun))))) |
| 3039 | 3039 | ||
| 3040 | (defun python-shell--tramp-with-environment (vec extraenv bodyfun) | 3040 | (defun python-shell--tramp-with-environment (vec extraenv bodyfun) |