Mercurial > emacs
comparison lisp/net/ange-ftp.el @ 42891:3f3b687cc8bf
(ange-ftp-bs2000-posix-hook-installed): Move defvar up.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 22 Jan 2002 01:42:44 +0000 |
parents | 3ee90bcdf67d |
children | 79af049b102e |
comparison
equal
deleted
inserted
replaced
42890:05f254304877 | 42891:3f3b687cc8bf |
---|---|
6074 (concat "^" (regexp-quote host) "$" | 6074 (concat "^" (regexp-quote host) "$" |
6075 (and ange-ftp-bs2000-host-regexp "\\|") | 6075 (and ange-ftp-bs2000-host-regexp "\\|") |
6076 ange-ftp-bs2000-host-regexp) | 6076 ange-ftp-bs2000-host-regexp) |
6077 ange-ftp-host-cache nil))) | 6077 ange-ftp-host-cache nil))) |
6078 | 6078 |
6079 (defvar ange-ftp-bs2000-posix-hook-installed nil) | |
6080 | |
6079 (defun ange-ftp-add-bs2000-posix-host (host) | 6081 (defun ange-ftp-add-bs2000-posix-host (host) |
6080 "Mark HOST as the name of a machine running BS2000 with POSIX subsystem." | 6082 "Mark HOST as the name of a machine running BS2000 with POSIX subsystem." |
6081 (interactive | 6083 (interactive |
6082 (list (read-string "Host: " | 6084 (list (read-string "Host: " |
6083 (let ((name (or (buffer-file-name) default-directory))) | 6085 (let ((name (or (buffer-file-name) default-directory))) |
6143 (or (assq 'bs2000 ange-ftp-parse-list-func-alist) | 6145 (or (assq 'bs2000 ange-ftp-parse-list-func-alist) |
6144 (setq ange-ftp-parse-list-func-alist | 6146 (setq ange-ftp-parse-list-func-alist |
6145 (cons '(bs2000 . ange-ftp-parse-bs2000-listing) | 6147 (cons '(bs2000 . ange-ftp-parse-bs2000-listing) |
6146 ange-ftp-parse-list-func-alist))) | 6148 ange-ftp-parse-list-func-alist))) |
6147 | 6149 |
6148 (defvar ange-ftp-bs2000-posix-hook-installed nil) | |
6149 (defun ange-ftp-bs2000-cd-to-posix () | 6150 (defun ange-ftp-bs2000-cd-to-posix () |
6150 "cd to POSIX subsystem if the current host matches | 6151 "cd to POSIX subsystem if the current host matches |
6151 ange-ftp-bs2000-posix-host-regexp. All BS2000 hosts with POSIX subsystem | 6152 ange-ftp-bs2000-posix-host-regexp. All BS2000 hosts with POSIX subsystem |
6152 MUST BE EXPLICITLY SET with ange-ftp-add-bs2000-posix-host for they cannot | 6153 MUST BE EXPLICITLY SET with ange-ftp-add-bs2000-posix-host for they cannot |
6153 be recognized automatically (they are all valid BS2000 hosts too)." | 6154 be recognized automatically (they are all valid BS2000 hosts too)." |
6155 (progn | 6156 (progn |
6156 ;; change to POSIX: | 6157 ;; change to POSIX: |
6157 ; (ange-ftp-raw-send-cmd proc "cd %POSIX") | 6158 ; (ange-ftp-raw-send-cmd proc "cd %POSIX") |
6158 (ange-ftp-cd host user "%POSIX") | 6159 (ange-ftp-cd host user "%POSIX") |
6159 ;; put new home directory in the expand-dir hashtable. | 6160 ;; put new home directory in the expand-dir hashtable. |
6161 ;; `host' and `user' are bound in ange-ftp-get-process. | |
6160 (ange-ftp-put-hash-entry (concat host "/" user "/~") | 6162 (ange-ftp-put-hash-entry (concat host "/" user "/~") |
6161 (car (ange-ftp-get-pwd host user)) | 6163 (car (ange-ftp-get-pwd host user)) |
6162 ange-ftp-expand-dir-hashtable)))) | 6164 ange-ftp-expand-dir-hashtable)))) |
6163 | 6165 |
6164 ;; Not available yet: | 6166 ;; Not available yet: |