emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3e8aad7: * lisp/net/tramp-sh.el (tramp-maybe-open-c


From: Michael Albinus
Subject: [Emacs-diffs] master 3e8aad7: * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert fix for Bug#35769
Date: Sun, 26 May 2019 15:37:42 -0400 (EDT)

branch: master
commit 3e8aad77b10767c76ffdc56875e470b551e3fa56
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert fix for 
Bug#35769
---
 lisp/net/tramp-sh.el | 34 ++++++++++++++--------------------
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 11b1af8..2d27baf 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4769,8 +4769,8 @@ Does not do anything if a connection is already open, but 
re-opens the
 connection if a previous connection has died for some reason."
   (let ((p (tramp-get-connection-process vec))
        (process-name (tramp-get-connection-property vec "process-name" nil))
-       (pos (with-current-buffer (tramp-get-connection-buffer vec) (point)))
-       tmp-process-environment)
+       (process-environment (copy-sequence process-environment))
+       (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
 
     ;; If Tramp opens the same connection within a short time frame,
     ;; there is a problem.  We shall signal this.
@@ -4835,22 +4835,17 @@ connection if a previous connection has died for some 
reason."
              ;; Start new process.
              (when (and p (processp p))
                (delete-process p))
-             ;; Use a temporary `process-environment', in order not
-             ;; to penetrate local processes.
-             (let ((process-environment (copy-sequence process-environment)))
-               (setenv "TERM" tramp-terminal-type)
-               (setenv "LC_ALL" (tramp-get-local-locale vec))
-               (if (stringp tramp-histfile-override)
-                   (setenv "HISTFILE" tramp-histfile-override)
-                 (if tramp-histfile-override
-                     (progn
-                       (setenv "HISTFILE")
-                       (setenv "HISTFILESIZE" "0")
-                       (setenv "HISTSIZE" "0"))))
-               (setenv "PROMPT_COMMAND")
-               (setenv "PS1" tramp-initial-end-of-output)
-               (setq tmp-process-environment
-                     (copy-sequence process-environment)))
+             (setenv "TERM" tramp-terminal-type)
+             (setenv "LC_ALL" (tramp-get-local-locale vec))
+             (if (stringp tramp-histfile-override)
+                 (setenv "HISTFILE" tramp-histfile-override)
+               (if tramp-histfile-override
+                   (progn
+                     (setenv "HISTFILE")
+                     (setenv "HISTFILESIZE" "0")
+                     (setenv "HISTSIZE" "0"))))
+             (setenv "PROMPT_COMMAND")
+             (setenv "PS1" tramp-initial-end-of-output)
               (unless (stringp tramp-encoding-shell)
                 (tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
              (let* ((current-host (system-name))
@@ -4867,8 +4862,7 @@ connection if a previous connection has died for some 
reason."
                     ;; This must be done in order to avoid our file
                     ;; name handler.
                     (p (let ((default-directory
-                               (tramp-compat-temporary-file-directory))
-                             (process-environment tmp-process-environment))
+                               (tramp-compat-temporary-file-directory)))
                          (apply
                           #'start-process
                           (tramp-get-connection-name vec)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]