Mercurial > emacs
comparison lisp/net/tramp-ftp.el @ 50494:5b6aaf393205
Version 2.0.33 released.
Change coding cookie to `iso-2022-7bit' for XEmacs
compatibility. (From Steve Youngs <youngs@xemacs.org>.)
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Tue, 08 Apr 2003 20:06:12 +0000 |
parents | 407d6516031a |
children | 6234a4fe96f9 |
comparison
equal
deleted
inserted
replaced
50493:8998794f812c | 50494:5b6aaf393205 |
---|---|
92 First arg specifies the OPERATION, second arg is a list of arguments to | 92 First arg specifies the OPERATION, second arg is a list of arguments to |
93 pass to the OPERATION." | 93 pass to the OPERATION." |
94 (save-match-data | 94 (save-match-data |
95 (or (boundp 'ange-ftp-name-format) | 95 (or (boundp 'ange-ftp-name-format) |
96 (require 'ange-ftp)) | 96 (require 'ange-ftp)) |
97 (let* ((ange-ftp-name-format | 97 (let ((ange-ftp-name-format |
98 (list (nth 0 tramp-file-name-structure) | 98 (list (nth 0 tramp-file-name-structure) |
99 (nth 3 tramp-file-name-structure) | 99 (nth 3 tramp-file-name-structure) |
100 (nth 2 tramp-file-name-structure) | 100 (nth 2 tramp-file-name-structure) |
101 (nth 4 tramp-file-name-structure))) | 101 (nth 4 tramp-file-name-structure)))) |
102 (inhibit-file-name-handlers | 102 (cond |
103 (list 'tramp-file-name-handler | 103 ;; If argument is a symlink, 'file-directory-p` and 'file-exists-p` |
104 'tramp-completion-file-name-handler | 104 ;; call the traversed file recursively. So we cannot disable the |
105 (and (eq inhibit-file-name-operation operation) | 105 ;;file-name-handler this case. |
106 inhibit-file-name-handlers))) | 106 ((memq operation '(file-directory-p file-exists-p)) |
107 (inhibit-file-name-operation operation)) | 107 (apply 'ange-ftp-hook-function operation args)) |
108 (apply 'ange-ftp-hook-function operation args)))) | 108 ;; Normally, the handlers must be discarded |
109 (t (let* ((inhibit-file-name-handlers | |
110 (list 'tramp-file-name-handler | |
111 'tramp-completion-file-name-handler | |
112 (and (eq inhibit-file-name-operation operation) | |
113 inhibit-file-name-handlers))) | |
114 (inhibit-file-name-operation operation)) | |
115 (apply 'ange-ftp-hook-function operation args))))))) | |
109 | 116 |
110 (defun tramp-ftp-file-name-p (filename) | 117 (defun tramp-ftp-file-name-p (filename) |
111 "Check if it's a filename that should be forwarded to Ange-FTP." | 118 "Check if it's a filename that should be forwarded to Ange-FTP." |
112 (let ((v (tramp-dissect-file-name filename))) | 119 (let ((v (tramp-dissect-file-name filename))) |
113 (string= | 120 (string= |
125 | 132 |
126 ;;; TODO: | 133 ;;; TODO: |
127 | 134 |
128 ;; * In case of "/ftp:host:file" this works only for functions which | 135 ;; * In case of "/ftp:host:file" this works only for functions which |
129 ;; are defined in `tramp-file-name-handler-alist'. Call has to be | 136 ;; are defined in `tramp-file-name-handler-alist'. Call has to be |
130 ;; pretended in `tramp-file-name-handler' otherwise. Looks like | 137 ;; pretended in `tramp-file-name-handler' otherwise. |
131 ;; `ange-ftp-completion-hook-function' and `ange-ftp-hook-function' | 138 ;; Furthermore, there are no backup files on FTP hosts. |
132 ;; are active temporarily in `file-name-handler-alist'. | |
133 ;; Furthermore, there are no backup files on FTP hosts this case. | |
134 ;; Worth further investigations. | 139 ;; Worth further investigations. |
135 | 140 |
136 ;;; tramp-ftp.el ends here | 141 ;;; tramp-ftp.el ends here |