2233 |
'identity) |
'identity) |
2234 |
cmd1) |
cmd1) |
2235 |
cmd3 (nth 3 cmd)) |
cmd3 (nth 3 cmd)) |
2236 |
;; Need to deal with the HP-UX ftp bug. This should also allow |
;; Need to deal with the HP-UX ftp bug. This should also allow us to |
2237 |
;; us to resolve symlinks to directories on SysV machines. (Sebastian will |
;; resolve symlinks to directories on SysV machines. (Sebastian will |
2238 |
;; be happy.) |
;; be happy.) |
2239 |
(and (eq host-type 'unix) |
(and (eq host-type 'unix) |
2240 |
(string-match "/$" cmd1) |
(string-match "/$" cmd1) |
3876 |
(or val ; is a directory name |
(or val ; is a directory name |
3877 |
(not (string-match ange-ftp-completion-ignored-pattern symname)))))) |
(not (string-match ange-ftp-completion-ignored-pattern symname)))))) |
3878 |
|
|
3879 |
|
(defun ange-ftp-root-dir-p (dir) |
3880 |
|
;; Maybe we should use something more like |
3881 |
|
;; (equal dir (file-name-directory (directory-file-name dir))) -stef |
3882 |
|
(or (and (eq system-type 'windows-nt) |
3883 |
|
(string-match "^[a-zA-Z]:[/\\]$" dir)) |
3884 |
|
(string-equal "/" dir))) |
3885 |
|
|
3886 |
(defun ange-ftp-file-name-all-completions (file dir) |
(defun ange-ftp-file-name-all-completions (file dir) |
3887 |
(let ((ange-ftp-this-dir (expand-file-name dir))) |
(let ((ange-ftp-this-dir (expand-file-name dir))) |
3888 |
(if (ange-ftp-ftp-name ange-ftp-this-dir) |
(if (ange-ftp-ftp-name ange-ftp-this-dir) |
3908 |
file))) |
file))) |
3909 |
completions))) |
completions))) |
3910 |
|
|
3911 |
(if (or (and (eq system-type 'windows-nt) |
(if (ange-ftp-root-dir-p ange-ftp-this-dir) |
|
(string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir)) |
|
|
(string-equal "/" ange-ftp-this-dir)) |
|
3912 |
(nconc (all-completions file (ange-ftp-generate-root-prefixes)) |
(nconc (all-completions file (ange-ftp-generate-root-prefixes)) |
3913 |
(ange-ftp-real-file-name-all-completions file |
(ange-ftp-real-file-name-all-completions file |
3914 |
ange-ftp-this-dir)) |
ange-ftp-this-dir)) |
3938 |
file tbl ange-ftp-this-dir |
file tbl ange-ftp-this-dir |
3939 |
(function ange-ftp-file-entry-active-p))))))) |
(function ange-ftp-file-entry-active-p))))))) |
3940 |
|
|
3941 |
(if (or (and (eq system-type 'windows-nt) |
(if (ange-ftp-root-dir-p ange-ftp-this-dir) |
|
(string-match "^[a-zA-Z]:[/\\]$" ange-ftp-this-dir)) |
|
|
(string-equal "/" ange-ftp-this-dir)) |
|
3942 |
(try-completion |
(try-completion |
3943 |
file |
file |
3944 |
(nconc (ange-ftp-generate-root-prefixes) |
(nconc (ange-ftp-generate-root-prefixes) |
4204 |
;;;###autoload |
;;;###autoload |
4205 |
(defun ange-ftp-hook-function (operation &rest args) |
(defun ange-ftp-hook-function (operation &rest args) |
4206 |
(let ((fn (get operation 'ange-ftp))) |
(let ((fn (get operation 'ange-ftp))) |
4207 |
(if fn (apply fn args) |
(if fn (save-match-data (apply fn args)) |
4208 |
(ange-ftp-run-real-handler operation args)))) |
(ange-ftp-run-real-handler operation args)))) |
4209 |
|
|
4210 |
|
|
4395 |
(if wildcard |
(if wildcard |
4396 |
(let ((default-directory (file-name-directory file))) |
(let ((default-directory (file-name-directory file))) |
4397 |
(ange-ftp-ls (file-name-nondirectory file) switches nil nil t)) |
(ange-ftp-ls (file-name-nondirectory file) switches nil nil t)) |
4398 |
(ange-ftp-ls file switches full))))q |
(ange-ftp-ls file switches full)))) |
4399 |
(ange-ftp-real-insert-directory file switches wildcard full)))) |
(ange-ftp-real-insert-directory file switches wildcard full)))) |
4400 |
|
|
4401 |
(defun ange-ftp-dired-uncache (dir) |
(defun ange-ftp-dired-uncache (dir) |
4427 |
(if (> (length name) 0) ; else it's $HOME |
(if (> (length name) 0) ; else it's $HOME |
4428 |
(setq command (concat "cd " name "; " command))) |
(setq command (concat "cd " name "; " command))) |
4429 |
;; Remove port from the hostname |
;; Remove port from the hostname |
4430 |
(string-match "\\(.*\\)#\\(.*\\)" host) |
(when (string-match "\\(.*\\)#" host) |
4431 |
(setq host (match-string 1 host)) |
(setq host (match-string 1 host))) |
4432 |
(setq command |
(setq command |
4433 |
(format "%s %s \"%s\"" ; remsh -l USER does not work well |
(format "%s %s \"%s\"" ; remsh -l USER does not work well |
4434 |
; on a hp-ux machine I tried |
; on a hp-ux machine I tried |