diff options
| author | Michael Albinus | 2016-03-11 13:20:26 +0100 |
|---|---|---|
| committer | Michael Albinus | 2016-03-11 13:20:26 +0100 |
| commit | 2d47f4c8018f74b2eb4a7fea4498e8cbf170a0c7 (patch) | |
| tree | 3f359f90e067284f74d6f39d7093be233f86700c | |
| parent | ea626c72e590aa7a45fd26df42240854e4225cef (diff) | |
| download | emacs-2d47f4c8018f74b2eb4a7fea4498e8cbf170a0c7.tar.gz emacs-2d47f4c8018f74b2eb4a7fea4498e8cbf170a0c7.zip | |
Remove compat code in Tramp
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Remove compat code.
| -rw-r--r-- | lisp/net/tramp-sh.el | 66 |
1 files changed, 29 insertions, 37 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c2ab67b6f4f..4ff21c1df4b 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4120,44 +4120,36 @@ process to set up. VEC specifies the connection." | |||
| 4120 | ;; CCC this can't be the right way to do it. Hm. | 4120 | ;; CCC this can't be the right way to do it. Hm. |
| 4121 | (tramp-message vec 5 "Determining coding system") | 4121 | (tramp-message vec 5 "Determining coding system") |
| 4122 | (with-current-buffer (process-buffer proc) | 4122 | (with-current-buffer (process-buffer proc) |
| 4123 | (if (featurep 'mule) | 4123 | ;; Use MULE to select the right EOL convention for communicating |
| 4124 | ;; Use MULE to select the right EOL convention for communicating | 4124 | ;; with the process. |
| 4125 | ;; with the process. | 4125 | (let ((cs (or (and (memq 'utf-8 (coding-system-list)) |
| 4126 | (let ((cs (or (and (memq 'utf-8 (coding-system-list)) | 4126 | (string-match "utf-?8" (tramp-get-remote-locale vec)) |
| 4127 | (string-match "utf-?8" (tramp-get-remote-locale vec)) | 4127 | (cons 'utf-8 'utf-8)) |
| 4128 | (cons 'utf-8 'utf-8)) | 4128 | (process-coding-system proc) |
| 4129 | (process-coding-system proc) | 4129 | (cons 'undecided 'undecided))) |
| 4130 | (cons 'undecided 'undecided))) | 4130 | cs-decode cs-encode) |
| 4131 | cs-decode cs-encode) | 4131 | (when (symbolp cs) (setq cs (cons cs cs))) |
| 4132 | (when (symbolp cs) (setq cs (cons cs cs))) | 4132 | (setq cs-decode (or (car cs) 'undecided) |
| 4133 | (setq cs-decode (or (car cs) 'undecided) | 4133 | cs-encode (or (cdr cs) 'undecided) |
| 4134 | cs-encode (or (cdr cs) 'undecided)) | 4134 | cs-encode |
| 4135 | (setq cs-encode | 4135 | (coding-system-change-eol-conversion |
| 4136 | (coding-system-change-eol-conversion | 4136 | cs-encode |
| 4137 | cs-encode | 4137 | (if (string-match |
| 4138 | (if (string-match | 4138 | "^Darwin" (tramp-get-connection-property vec "uname" "")) |
| 4139 | "^Darwin" (tramp-get-connection-property vec "uname" "")) | 4139 | 'mac 'unix))) |
| 4140 | 'mac 'unix))) | 4140 | (tramp-send-command vec "echo foo ; echo bar" t) |
| 4141 | (tramp-send-command vec "echo foo ; echo bar" t) | 4141 | (goto-char (point-min)) |
| 4142 | (goto-char (point-min)) | ||
| 4143 | (when (search-forward "\r" nil t) | ||
| 4144 | (setq cs-decode (coding-system-change-eol-conversion | ||
| 4145 | cs-decode 'dos))) | ||
| 4146 | ;; Special setting for Mac OS X. | ||
| 4147 | (when (and (string-match | ||
| 4148 | "^Darwin" (tramp-get-connection-property vec "uname" "")) | ||
| 4149 | (memq 'utf-8-hfs (coding-system-list))) | ||
| 4150 | (setq cs-decode 'utf-8-hfs | ||
| 4151 | cs-encode 'utf-8-hfs)) | ||
| 4152 | (set-buffer-process-coding-system cs-decode cs-encode) | ||
| 4153 | (tramp-message | ||
| 4154 | vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)) | ||
| 4155 | ;; Look for ^M and do something useful if found. | ||
| 4156 | (when (search-forward "\r" nil t) | 4142 | (when (search-forward "\r" nil t) |
| 4157 | ;; We have found a ^M but cannot frob the process coding system | 4143 | (setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos))) |
| 4158 | ;; because we're running on a non-MULE Emacs. Let's try | 4144 | ;; Special setting for Mac OS X. |
| 4159 | ;; stty, instead. | 4145 | (when (and (string-match |
| 4160 | (tramp-send-command vec "stty -onlcr" t)))) | 4146 | "^Darwin" (tramp-get-connection-property vec "uname" "")) |
| 4147 | (memq 'utf-8-hfs (coding-system-list))) | ||
| 4148 | (setq cs-decode 'utf-8-hfs | ||
| 4149 | cs-encode 'utf-8-hfs)) | ||
| 4150 | (set-buffer-process-coding-system cs-decode cs-encode) | ||
| 4151 | (tramp-message | ||
| 4152 | vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))) | ||
| 4161 | 4153 | ||
| 4162 | (tramp-send-command vec "set +o vi +o emacs" t) | 4154 | (tramp-send-command vec "set +o vi +o emacs" t) |
| 4163 | 4155 | ||