diff options
| author | Michael Albinus | 2019-04-13 12:34:44 +0200 |
|---|---|---|
| committer | Michael Albinus | 2019-04-13 12:34:44 +0200 |
| commit | c2c9ef2c1e509f1a01ffaefd7475004854162a10 (patch) | |
| tree | e06eb9f6eb5ad35a0ef08f423cf806724dda2760 | |
| parent | 181e0c09672175f167b12f1a1ed8f8d488c2a487 (diff) | |
| download | emacs-c2c9ef2c1e509f1a01ffaefd7475004854162a10.tar.gz emacs-c2c9ef2c1e509f1a01ffaefd7475004854162a10.zip | |
Fix error in tramp-sh.el
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Revert "simplification", which was an error.
| -rw-r--r-- | lisp/net/tramp-sh.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 7d903c5769c..d9751a9f973 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2903,7 +2903,8 @@ the result will be a local, non-Tramp, file name." | |||
| 2903 | ;; otherwise we might be interrupted by | 2903 | ;; otherwise we might be interrupted by |
| 2904 | ;; `verify-visited-file-modtime'. | 2904 | ;; `verify-visited-file-modtime'. |
| 2905 | (let ((buffer-undo-list t) | 2905 | (let ((buffer-undo-list t) |
| 2906 | (inhibit-read-only t)) | 2906 | (inhibit-read-only t) |
| 2907 | (mark (point-max))) | ||
| 2907 | (clear-visited-file-modtime) | 2908 | (clear-visited-file-modtime) |
| 2908 | (narrow-to-region (point-max) (point-max)) | 2909 | (narrow-to-region (point-max) (point-max)) |
| 2909 | ;; We call `tramp-maybe-open-connection', in | 2910 | ;; We call `tramp-maybe-open-connection', in |
| @@ -2916,7 +2917,12 @@ the result will be a local, non-Tramp, file name." | |||
| 2916 | (let ((pid (tramp-send-command-and-read v "echo $$"))) | 2917 | (let ((pid (tramp-send-command-and-read v "echo $$"))) |
| 2917 | (process-put p 'remote-pid pid) | 2918 | (process-put p 'remote-pid pid) |
| 2918 | (tramp-set-connection-property p "remote-pid" pid)) | 2919 | (tramp-set-connection-property p "remote-pid" pid)) |
| 2919 | (delete-region (point-min) (point-max)) | 2920 | ;; `tramp-maybe-open-connection' and |
| 2921 | ;; `tramp-send-command-and-read' could have | ||
| 2922 | ;; trashed the connection buffer. Remove this. | ||
| 2923 | (widen) | ||
| 2924 | (delete-region mark (point-max)) | ||
| 2925 | (narrow-to-region (point-max) (point-max)) | ||
| 2920 | ;; Now do it. | 2926 | ;; Now do it. |
| 2921 | (if command | 2927 | (if command |
| 2922 | ;; Send the command. | 2928 | ;; Send the command. |