(x_new_font): Update f->scroll_bar_actual_width.
[bpt/emacs.git] / lisp / net / tramp-fish.el
index 73fb1db..8db5dc8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; tramp-fish.el --- Tramp access functions for FISH protocol
 
-;; Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
@@ -209,7 +209,7 @@ Used instead of analyzing error codes of commands.")
     (directory-files-and-attributes . tramp-fish-handle-directory-files-and-attributes)
     ;; `dired-call-process' performed by default handler
     ;; `dired-compress-file' performed by default handler
-    ;; `dired-uncache' performed by default handler
+    (dired-uncache . tramp-handle-dired-uncache)
     (expand-file-name . tramp-fish-handle-expand-file-name)
     ;; `file-accessible-directory-p' performed by default handler
     (file-attributes . tramp-fish-handle-file-attributes)
@@ -220,7 +220,7 @@ Used instead of analyzing error codes of commands.")
     (file-remote-p . tramp-handle-file-remote-p)
     (file-modes . tramp-handle-file-modes)
     (file-name-all-completions . tramp-fish-handle-file-name-all-completions)
-    ;; `file-name-as-directory' performed by default handler
+    (file-name-as-directory . tramp-handle-file-name-as-directory)
     (file-name-completion . tramp-handle-file-name-completion)
     (file-name-directory . tramp-handle-file-name-directory)
     (file-name-nondirectory . tramp-handle-file-name-nondirectory)
@@ -312,10 +312,19 @@ pass to the OPERATION."
   (tramp-fish-do-copy-or-rename-file
    'copy filename newname ok-if-already-exists keep-date preserve-uid-gid))
 
-(defun tramp-fish-handle-delete-directory (directory)
+(defun tramp-fish-handle-delete-directory (directory &optional recursive)
   "Like `delete-directory' for Tramp files."
   (when (file-exists-p directory)
-    (with-parsed-tramp-file-name
+    (if recursive
+       (mapc
+        (lambda (file)
+          (if (file-directory-p file)
+              (tramp-compat-delete-directory file recursive)
+            (delete-file file)))
+        ;; We do not want to delete "." and "..".
+        (directory-files
+         directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
+     (with-parsed-tramp-file-name
        (directory-file-name (expand-file-name directory)) nil
       (tramp-flush-directory-property v localname)
       (tramp-fish-send-command-and-check v (format "#RMD %s" localname)))))
@@ -917,7 +926,7 @@ PRESERVE-UID-GID is completely ignored."
   (when (and keep-date (functionp 'set-file-times))
     (set-file-times newname (nth 5 (file-attributes filename))))
   ;; Set the mode.
-  (set-file-modes newname (file-modes filename)))
+  (set-file-modes newname (tramp-default-file-modes filename)))
 
 (defun tramp-fish-get-file-entries (vec localname list)
   "Read entries returned by FISH server.