diff options
| author | Michael Albinus | 2019-05-26 21:37:34 +0200 |
|---|---|---|
| committer | Michael Albinus | 2019-05-26 21:37:34 +0200 |
| commit | 3e8aad77b10767c76ffdc56875e470b551e3fa56 (patch) | |
| tree | 5c9dbbb31e8cb4f2e6928439ab2f0c5e6e1b0350 | |
| parent | e06a4f0fa0a08175131604e431c65b4129b0e0dd (diff) | |
| download | emacs-3e8aad77b10767c76ffdc56875e470b551e3fa56.tar.gz emacs-3e8aad77b10767c76ffdc56875e470b551e3fa56.zip | |
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert fix for Bug#35769
| -rw-r--r-- | lisp/net/tramp-sh.el | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 11b1af8116e..2d27baf454a 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 | |||
| 4769 | connection if a previous connection has died for some reason." | 4769 | connection if a previous connection has died for some reason." |
| 4770 | (let ((p (tramp-get-connection-process vec)) | 4770 | (let ((p (tramp-get-connection-process vec)) |
| 4771 | (process-name (tramp-get-connection-property vec "process-name" nil)) | 4771 | (process-name (tramp-get-connection-property vec "process-name" nil)) |
| 4772 | (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))) | 4772 | (process-environment (copy-sequence process-environment)) |
| 4773 | tmp-process-environment) | 4773 | (pos (with-current-buffer (tramp-get-connection-buffer vec) (point)))) |
| 4774 | 4774 | ||
| 4775 | ;; If Tramp opens the same connection within a short time frame, | 4775 | ;; If Tramp opens the same connection within a short time frame, |
| 4776 | ;; there is a problem. We shall signal this. | 4776 | ;; there is a problem. We shall signal this. |
| @@ -4835,22 +4835,17 @@ connection if a previous connection has died for some reason." | |||
| 4835 | ;; Start new process. | 4835 | ;; Start new process. |
| 4836 | (when (and p (processp p)) | 4836 | (when (and p (processp p)) |
| 4837 | (delete-process p)) | 4837 | (delete-process p)) |
| 4838 | ;; Use a temporary `process-environment', in order not | 4838 | (setenv "TERM" tramp-terminal-type) |
| 4839 | ;; to penetrate local processes. | 4839 | (setenv "LC_ALL" (tramp-get-local-locale vec)) |
| 4840 | (let ((process-environment (copy-sequence process-environment))) | 4840 | (if (stringp tramp-histfile-override) |
| 4841 | (setenv "TERM" tramp-terminal-type) | 4841 | (setenv "HISTFILE" tramp-histfile-override) |
| 4842 | (setenv "LC_ALL" (tramp-get-local-locale vec)) | 4842 | (if tramp-histfile-override |
| 4843 | (if (stringp tramp-histfile-override) | 4843 | (progn |
| 4844 | (setenv "HISTFILE" tramp-histfile-override) | 4844 | (setenv "HISTFILE") |
| 4845 | (if tramp-histfile-override | 4845 | (setenv "HISTFILESIZE" "0") |
| 4846 | (progn | 4846 | (setenv "HISTSIZE" "0")))) |
| 4847 | (setenv "HISTFILE") | 4847 | (setenv "PROMPT_COMMAND") |
| 4848 | (setenv "HISTFILESIZE" "0") | 4848 | (setenv "PS1" tramp-initial-end-of-output) |
| 4849 | (setenv "HISTSIZE" "0")))) | ||
| 4850 | (setenv "PROMPT_COMMAND") | ||
| 4851 | (setenv "PS1" tramp-initial-end-of-output) | ||
| 4852 | (setq tmp-process-environment | ||
| 4853 | (copy-sequence process-environment))) | ||
| 4854 | (unless (stringp tramp-encoding-shell) | 4849 | (unless (stringp tramp-encoding-shell) |
| 4855 | (tramp-error vec 'file-error "`tramp-encoding-shell' not set")) | 4850 | (tramp-error vec 'file-error "`tramp-encoding-shell' not set")) |
| 4856 | (let* ((current-host (system-name)) | 4851 | (let* ((current-host (system-name)) |
| @@ -4867,8 +4862,7 @@ connection if a previous connection has died for some reason." | |||
| 4867 | ;; This must be done in order to avoid our file | 4862 | ;; This must be done in order to avoid our file |
| 4868 | ;; name handler. | 4863 | ;; name handler. |
| 4869 | (p (let ((default-directory | 4864 | (p (let ((default-directory |
| 4870 | (tramp-compat-temporary-file-directory)) | 4865 | (tramp-compat-temporary-file-directory))) |
| 4871 | (process-environment tmp-process-environment)) | ||
| 4872 | (apply | 4866 | (apply |
| 4873 | #'start-process | 4867 | #'start-process |
| 4874 | (tramp-get-connection-name vec) | 4868 | (tramp-get-connection-name vec) |