]> code.delx.au - gnu-emacs/blobdiff - lisp/net/ange-ftp.el
Merge changes from emacs-23 branch.
[gnu-emacs] / lisp / net / ange-ftp.el
index 73cb2e57bb254801793f3f31767cee8d857c5302..4b63dfd75354d5858fc6c91978dacfef1d013586 100644 (file)
@@ -722,6 +722,7 @@ parenthesized expressions in REGEXP for the components (in that order)."
          "^Data connection \\|"
          "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|"
           "^500 .*AUTH\\|^KERBEROS\\|"
+          "^504 Unknown security mechanism\\|"
          "^530 Please login with USER and PASS\\|" ; non kerberised vsFTPd
          "^534 Kerberos Authentication not enabled\\|"
          "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT")
@@ -1736,7 +1737,7 @@ good, skip, fatal, or unknown."
 
 (defun ange-ftp-del-tmp-name (filename)
   "Force to delete temporary file."
-  (delete-file filename 'force))
+  (delete-file filename))
 
 \f
 ;;;; ------------------------------------------------------------
@@ -3507,8 +3508,9 @@ system TYPE.")
        (file-exists-p file)
       (ange-ftp-real-file-executable-p file))))
 
-(defun ange-ftp-delete-file (file &optional force)
-  (interactive "fDelete file: ")
+(defun ange-ftp-delete-file (file &optional trash)
+  (interactive (list (read-file-name "Delete file: " nil default-directory)
+                    (null current-prefix-arg)))
   (setq file (expand-file-name file))
   (let ((parsed (ange-ftp-ftp-name file)))
     (if parsed
@@ -3526,7 +3528,7 @@ system TYPE.")
                       (format "FTP Error: \"%s\"" (cdr result))
                       file)))
          (ange-ftp-delete-file-entry file))
-      (ange-ftp-real-delete-file file force))))
+      (ange-ftp-real-delete-file file trash))))
 
 (defun ange-ftp-file-modtime (file)
   "Return the modification time of remote file FILE.
@@ -3897,7 +3899,7 @@ E.g.,
          (ange-ftp-add-file-entry newname)
          (ange-ftp-delete-file-entry filename))
       (ange-ftp-copy-file-internal filename newname t nil)
-      (delete-file filename 'force))))
+      (delete-file filename))))
 
 (defun ange-ftp-rename-local-to-remote (filename newname)
   "Rename local file FILENAME to remote file NEWNAME."
@@ -3906,7 +3908,7 @@ E.g.,
         (msg (format "Renaming %s to %s" fabbr nabbr)))
     (ange-ftp-copy-file-internal filename newname t nil msg)
     (let (ange-ftp-process-verbose)
-      (delete-file filename 'force))))
+      (delete-file filename))))
 
 (defun ange-ftp-rename-remote-to-local (filename newname)
   "Rename remote file FILENAME to local file NEWNAME."
@@ -3915,7 +3917,7 @@ E.g.,
         (msg (format "Renaming %s to %s" fabbr nabbr)))
     (ange-ftp-copy-file-internal filename newname t nil msg)
     (let (ange-ftp-process-verbose)
-      (delete-file filename 'force))))
+      (delete-file filename))))
 
 (defun ange-ftp-rename-file (filename newname &optional ok-if-already-exists)
   (interactive "fRename file: \nFRename %s to file: \np")
@@ -4196,7 +4198,7 @@ directory, so that Emacs will know its current contents."
        (if copy
            (unwind-protect
                (funcall 'load copy noerror nomessage nosuffix)
-             (delete-file copy 'force))
+             (delete-file copy))
          (or noerror
              (signal 'file-error (list "Cannot open load file" file)))
          nil))
@@ -4267,7 +4269,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
          (if (zerop (buffer-size))
              (progn
                (let (ange-ftp-process-verbose)
-                 (delete-file file 'force))
+                 (delete-file file))
                (ange-ftp-copy-file-internal tmp2 nfile t nil msg2))))
       (ange-ftp-del-tmp-name tmp1)
       (ange-ftp-del-tmp-name tmp2))))
@@ -4303,7 +4305,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
          (if (zerop (buffer-size))
              (progn
                (let (ange-ftp-process-verbose)
-                 (delete-file file 'force))
+                 (delete-file file))
                (ange-ftp-copy-file-internal tmp2 nfile t nil msg2))))
       (ange-ftp-del-tmp-name tmp1)
       (ange-ftp-del-tmp-name tmp2))))