comparison lisp/net/tramp-fish.el @ 107820:e97568b31550

Synchronize with Tramp repository. * net/tramp.el (tramp-completion-function-alist) (tramp-file-name-regexp, tramp-chunksize) (tramp-local-coding-commands, tramp-remote-coding-commands): Fix docstring. (tramp-remote-process-environment): Use `format' instead of `concat'. (tramp-handle-directory-files-and-attributes) (tramp-get-remote-path): Use `copy-tree'. (tramp-handle-file-name-all-completions): Backward/ XEmacs compatibility: Use `completion-ignore-case' if `read-file-name-completion-ignore-case' does not exist. (tramp-do-copy-or-rename-file-directly): Do not use `tramp-handle-file-remote-p'. (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-compat-delete-directory'. (tramp-do-copy-or-rename-file-out-of-band) (tramp-compute-multi-hops, tramp-maybe-open-connection): Use `format-spec-make'. (tramp-find-foreign-file-name-handler) (tramp-advice-make-auto-save-file-name) (tramp-set-auto-save-file-modes): Remove superfluous check for `stringp'. This is done inside `tramp-tramp-file-p'. (tramp-debug-outline-regexp): New defconst. (tramp-get-debug-buffer): Use it. (tramp-check-for-regexp): Use (forward-line 1). (tramp-set-auto-save-file-modes): Adapt version check. * net/tramp-compat.el (tramp-advice-file-expand-wildcards): Wrap call of `featurep' for 2nd argument. (tramp-compat-make-temp-file): Simplify fallback implementation. (tramp-compat-copy-tree): Remove function. (tramp-compat-delete-directory): Provide implementation for older Emacsen. * net/tramp-fish.el (tramp-fish-handle-directory-files-and-attributes): Do not use `tramp-fish-handle-file-attributes. * net/trampver.el: Update release number.
author Michael Albinus <albinus@detlef>
date Sat, 10 Apr 2010 14:50:31 +0200
parents 1d1d5d9bd884
children 93125d6fab29
comparison
equal deleted inserted replaced
107819:834292200403 107820:e97568b31550
339 (defun tramp-fish-handle-directory-files-and-attributes 339 (defun tramp-fish-handle-directory-files-and-attributes
340 (directory &optional full match nosort id-format) 340 (directory &optional full match nosort id-format)
341 "Like `directory-files-and-attributes' for Tramp files." 341 "Like `directory-files-and-attributes' for Tramp files."
342 (mapcar 342 (mapcar
343 (lambda (x) 343 (lambda (x)
344 ;; We cannot call `file-attributes' for backward compatibility reasons. 344 (cons x
345 ;; Its optional parameter ID-FORMAT is introduced with Emacs 22. 345 (tramp-compat-file-attributes
346 (cons x (tramp-fish-handle-file-attributes 346 (if full x (expand-file-name x directory))
347 (if full x (expand-file-name x directory)) id-format))) 347 id-format)))
348 (directory-files directory full match nosort))) 348 (directory-files directory full match nosort)))
349 349
350 (defun tramp-fish-handle-expand-file-name (name &optional dir) 350 (defun tramp-fish-handle-expand-file-name (name &optional dir)
351 "Like `expand-file-name' for Tramp files." 351 "Like `expand-file-name' for Tramp files."
352 ;; If DIR is not given, use DEFAULT-DIRECTORY or "/". 352 ;; If DIR is not given, use DEFAULT-DIRECTORY or "/".
1028 ;; M<mimetype> 1028 ;; M<mimetype>
1029 ((looking-at "^M\\(.+\\)$") nil) 1029 ((looking-at "^M\\(.+\\)$") nil)
1030 ;; last line 1030 ;; last line
1031 ((looking-at "^$") 1031 ((looking-at "^$")
1032 (return))) 1032 (return)))
1033 ;; delete line 1033 ;; Delete line.
1034 (forward-line) 1034 (forward-line)
1035 (delete-region (point-min) (point)))) 1035 (delete-region (point-min) (point))))
1036 1036
1037 ;; delete trailing empty line 1037 ;; Delete trailing empty line.
1038 (forward-line) 1038 (forward-line)
1039 (delete-region (point-min) (point)) 1039 (delete-region (point-min) (point))
1040 1040
1041 ;; Return entry in file-attributes format 1041 ;; Return entry in `file-attributes' format.
1042 (list localname link -1 uid gid '(0 0) mtime '(0 0) size mode nil))) 1042 (list localname link -1 uid gid '(0 0) mtime '(0 0) size mode nil)))
1043 1043
1044 (defun tramp-fish-retrieve-data (vec) 1044 (defun tramp-fish-retrieve-data (vec)
1045 "Reads remote data for FISH protocol. 1045 "Reads remote data for FISH protocol.
1046 The data are left in the connection buffer of VEC for further processing. 1046 The data are left in the connection buffer of VEC for further processing.