[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-30 5fd75133cfe: Make 'python-shell--with-environment' respect buff
From: |
Eli Zaretskii |
Subject: |
emacs-30 5fd75133cfe: Make 'python-shell--with-environment' respect buffer-local vars |
Date: |
Sat, 31 Aug 2024 06:17:18 -0400 (EDT) |
branch: emacs-30
commit 5fd75133cfe389004f9fca8f11e093e531c45fe2
Author: Evgenii Klimov <eugene.dev@lipklim.org>
Commit: Eli Zaretskii <eliz@gnu.org>
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)
---
lisp/progmodes/python.el | 10 +++++-----
1 file 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
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-30 5fd75133cfe: Make 'python-shell--with-environment' respect buffer-local vars,
Eli Zaretskii <=