]> code.delx.au - gnu-emacs/blobdiff - lisp/net/tramp-ftp.el
* net/ange-ftp.el (ange-ftp-get-passwd): Bind
[gnu-emacs] / lisp / net / tramp-ftp.el
index d42a6f57ea90b237e3c7a7ac843fcab392781c1e..44ae176c6c902378398b6727f3530a42fa0bbc02 100644 (file)
@@ -1,6 +1,6 @@
 ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP
 
-;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2012 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
@@ -49,9 +49,8 @@
 (defun tramp-disable-ange-ftp ()
   "Turn Ange-FTP off.
 This is useful for unified remoting.  See
-`tramp-file-name-structure-unified' and
-`tramp-file-name-structure-separate' for details.  Requests suitable
-for Ange-FTP will be forwarded to Ange-FTP.  Also see the variables
+`tramp-file-name-structure' for details.  Requests suitable for
+Ange-FTP will be forwarded to Ange-FTP.  Also see the variables
 `tramp-ftp-method', `tramp-default-method', and
 `tramp-default-method-alist'.
 
@@ -99,7 +98,7 @@ present for backward compatibility."
 ;; Define FTP method ...
 ;;;###tramp-autoload
 (defconst tramp-ftp-method "ftp"
-  "*When this method name is used, forward all calls to Ange-FTP.")
+  "When this method name is used, forward all calls to Ange-FTP.")
 
 ;; ... and add it to the method list.
 ;;;###tramp-autoload
@@ -113,9 +112,11 @@ present for backward compatibility."
               (list nil "\\`\\(anonymous\\|ftp\\)\\'" tramp-ftp-method)))
 
 ;; Add completion function for FTP method.
-(tramp-set-completion-function
- tramp-ftp-method
- '((tramp-parse-netrc "~/.netrc")))
+;;;###tramp-autoload
+(eval-after-load 'tramp
+  '(tramp-set-completion-function
+     tramp-ftp-method
+     '((tramp-parse-netrc "~/.netrc"))))
 
 ;; If there is URL syntax, `substitute-in-file-name' needs special
 ;; handling.
@@ -202,8 +203,8 @@ pass to the OPERATION."
 ;;;###tramp-autoload
 (defsubst tramp-ftp-file-name-p (filename)
   "Check if it's a filename that should be forwarded to Ange-FTP."
-  (let ((v (tramp-dissect-file-name filename)))
-    (string= (tramp-file-name-method v) tramp-ftp-method)))
+  (string= (tramp-file-name-method (tramp-dissect-file-name filename))
+          tramp-ftp-method))
 
 ;;;###tramp-autoload
 (unless (featurep 'xemacs)