diff options
| author | Karl Heuer | 1998-09-10 16:01:37 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-09-10 16:01:37 +0000 |
| commit | e63d9e3174576261f0dad5a30c1cdca0cb503e6d (patch) | |
| tree | f376311abc1c6673995a4f507c1e84920e061caf /lisp | |
| parent | 05a40373215e7995aec79d1b3b426a2d4504f67b (diff) | |
| download | emacs-e63d9e3174576261f0dad5a30c1cdca0cb503e6d.tar.gz emacs-e63d9e3174576261f0dad5a30c1cdca0cb503e6d.zip | |
(ange-ftp-write-region): For `dumb-unix' host,
do use binary mode, just as for `unix'.
(ange-ftp-host-type): If HOST is nil, return `unix'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ange-ftp.el | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 5047047ffec..263fa4b6864 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el | |||
| @@ -560,15 +560,15 @@ | |||
| 560 | ;; ange-ftp-dired-host-type for local buffers. | 560 | ;; ange-ftp-dired-host-type for local buffers. |
| 561 | ;; | 561 | ;; |
| 562 | ;; t = a remote host of unknown type. Think t as in true, it's remote. | 562 | ;; t = a remote host of unknown type. Think t as in true, it's remote. |
| 563 | ;; Currently, 'unix is used as the default remote host type. | 563 | ;; Currently, `unix' is used as the default remote host type. |
| 564 | ;; Maybe we should use t. | 564 | ;; Maybe we should use t. |
| 565 | ;; | 565 | ;; |
| 566 | ;; 'type = a remote host of TYPE type. | 566 | ;; TYPE = a remote host of TYPE type. |
| 567 | ;; | 567 | ;; |
| 568 | ;; 'type:list = a remote host of TYPE type, using a specialized ftp listing | 568 | ;; TYPE:LIST = a remote host of TYPE type, using a specialized ftp listing |
| 569 | ;; program called list. This is currently only used for Unix | 569 | ;; program called list. This is currently only used for Unix |
| 570 | ;; dl (descriptive listings), when ange-ftp-dired-host-type | 570 | ;; dl (descriptive listings), when ange-ftp-dired-host-type |
| 571 | ;; is set to 'unix:dl. | 571 | ;; is set to `unix:dl'. |
| 572 | 572 | ||
| 573 | ;; Bug report codes: | 573 | ;; Bug report codes: |
| 574 | ;; | 574 | ;; |
| @@ -2157,29 +2157,33 @@ Create a new process if needed." | |||
| 2157 | "Return a symbol which represents the type of the HOST given. | 2157 | "Return a symbol which represents the type of the HOST given. |
| 2158 | If the optional argument USER is given, attempts to guess the | 2158 | If the optional argument USER is given, attempts to guess the |
| 2159 | host-type by logging in as USER." | 2159 | host-type by logging in as USER." |
| 2160 | (if (eq host ange-ftp-host-cache) | 2160 | (cond ((null host) 'unix) |
| 2161 | ange-ftp-host-type-cache | 2161 | ;; Return `unix' if HOST is nil, since that's the most vanilla |
| 2162 | ;; Trigger an ftp connection, in case we need to guess at the host type. | 2162 | ;; possible return value. |
| 2163 | (if (and user (ange-ftp-get-process host user) (eq host ange-ftp-host-cache)) | 2163 | ((eq host ange-ftp-host-cache) |
| 2164 | ange-ftp-host-type-cache | 2164 | ange-ftp-host-type-cache) |
| 2165 | (setq ange-ftp-host-cache host | 2165 | ;; Trigger an ftp connection, in case we need to guess at the host type. |
| 2166 | ange-ftp-host-type-cache | 2166 | ((and user (ange-ftp-get-process host user) (eq host ange-ftp-host-cache)) |
| 2167 | (cond ((ange-ftp-dumb-unix-host host) | 2167 | ange-ftp-host-type-cache) |
| 2168 | 'dumb-unix) | 2168 | (t |
| 2169 | ;; ((and (fboundp 'ange-ftp-vos-host) | 2169 | (setq ange-ftp-host-cache host |
| 2170 | ;; (ange-ftp-vos-host host)) | 2170 | ange-ftp-host-type-cache |
| 2171 | ;; 'vos) | 2171 | (cond ((ange-ftp-dumb-unix-host host) |
| 2172 | ((and (fboundp 'ange-ftp-vms-host) | 2172 | 'dumb-unix) |
| 2173 | (ange-ftp-vms-host host)) | 2173 | ;; ((and (fboundp 'ange-ftp-vos-host) |
| 2174 | 'vms) | 2174 | ;; (ange-ftp-vos-host host)) |
| 2175 | ((and (fboundp 'ange-ftp-mts-host) | 2175 | ;; 'vos) |
| 2176 | (ange-ftp-mts-host host)) | 2176 | ((and (fboundp 'ange-ftp-vms-host) |
| 2177 | 'mts) | 2177 | (ange-ftp-vms-host host)) |
| 2178 | ((and (fboundp 'ange-ftp-cms-host) | 2178 | 'vms) |
| 2179 | (ange-ftp-cms-host host)) | 2179 | ((and (fboundp 'ange-ftp-mts-host) |
| 2180 | 'cms) | 2180 | (ange-ftp-mts-host host)) |
| 2181 | (t | 2181 | 'mts) |
| 2182 | 'unix)))))) | 2182 | ((and (fboundp 'ange-ftp-cms-host) |
| 2183 | (ange-ftp-cms-host host)) | ||
| 2184 | 'cms) | ||
| 2185 | (t | ||
| 2186 | 'unix)))))) | ||
| 2183 | 2187 | ||
| 2184 | ;; It would be nice to abstract the functions ange-ftp-TYPE-host and | 2188 | ;; It would be nice to abstract the functions ange-ftp-TYPE-host and |
| 2185 | ;; ange-ftp-add-TYPE-host. The trick is to abstract these functions | 2189 | ;; ange-ftp-add-TYPE-host. The trick is to abstract these functions |
| @@ -3143,7 +3147,8 @@ system TYPE.") | |||
| 3143 | ;; of the transfer is irrelevant, i.e. we can use binary mode | 3147 | ;; of the transfer is irrelevant, i.e. we can use binary mode |
| 3144 | ;; regardless. Maybe a system-type to host-type lookup? | 3148 | ;; regardless. Maybe a system-type to host-type lookup? |
| 3145 | (binary (or (ange-ftp-binary-file filename) | 3149 | (binary (or (ange-ftp-binary-file filename) |
| 3146 | (eq (ange-ftp-host-type host user) 'unix))) | 3150 | (memq (ange-ftp-host-type host user) |
| 3151 | '(unix dumb-unix)))) | ||
| 3147 | (cmd (if append 'append 'put)) | 3152 | (cmd (if append 'append 'put)) |
| 3148 | (abbr (ange-ftp-abbreviate-filename filename)) | 3153 | (abbr (ange-ftp-abbreviate-filename filename)) |
| 3149 | ;; we need to reset `last-coding-system-used' to its | 3154 | ;; we need to reset `last-coding-system-used' to its |