aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2007-06-07 20:14:45 +0000
committerMichael Albinus2007-06-07 20:14:45 +0000
commit9ee5e81e952dc9bb9111b348f30b939399bed5bd (patch)
tree25c55fa22865f04bd75b78bacf1b63738dc281cf
parentcdd50783ca9d22d0d6428f91abc5e64170bd9369 (diff)
downloademacs-9ee5e81e952dc9bb9111b348f30b939399bed5bd.tar.gz
emacs-9ee5e81e952dc9bb9111b348f30b939399bed5bd.zip
Sync with Tramp 2.0.56.
-rw-r--r--lisp/ChangeLog31
-rw-r--r--lisp/net/tramp-ftp.el10
-rw-r--r--lisp/net/tramp-smb.el7
-rw-r--r--lisp/net/tramp-util.el1
-rw-r--r--lisp/net/tramp-uu.el3
-rw-r--r--lisp/net/tramp-vc.el2
-rw-r--r--lisp/net/tramp.el207
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--man/ChangeLog7
-rw-r--r--man/tramp.texi6
-rw-r--r--man/trampver.texi2
11 files changed, 168 insertions, 110 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e298874025e..79fb349d949 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,34 @@
12007-06-07 Michael Albinus <michael.albinus@gmx.de>
2
3 Sync with Tramp 2.0.56.
4
5 * net/tramp.el:
6 * net/tramp-ftp.el:
7 * net/tramp-smb.el:
8 * net/tramp-util.el:
9 * net/tramp-vc.el:
10 Don't load cl.el, because that pollutes the namespace. Replace cl
11 macros by their implementations where necessary. Requested by
12 Richard Stallman <rms@gnu.org>.
13
14 * net/tramp.el (top): Make `set-buffer-multibyte' an alias if it
15 doesn't exist.
16 (with-parsed-tramp-file-name): Protect debug spec during compilation.
17 (tramp-handle-insert-directory): Check (featurep 'ls-lisp).
18 (tramp-file-name-p, tramp-file-name-multi-method)
19 (tramp-file-name-method, tramp-file-name-user)
20 (tramp-file-name-host, tramp-file-name-localname): New defuns,
21 replacing defstruct `tramp-file-name'.
22 (tramp-handle-file-remote-p, tramp-completion-dissect-file-name1)
23 (tramp-dissect-file-name, tramp-dissect-multi-file-name):
24 Apply `vector' instead of `make-tramp-file-name'.
25 (tramp-handle-make-auto-save-file-name):
26 Apply `tramp-temporary-file-directory' for compatibility reasons.
27 (tramp-completion-mode): Use `natnump' instead of `wholenump'
28 because of XEmacs.
29 (tramp-completion-mode): `last-input-event' is nil when XEmacs is
30 started.
31
12007-06-07 David Kastrup <dak@gnu.org> 322007-06-07 David Kastrup <dak@gnu.org>
2 33
3 * dired.el (dired-recursive-deletes, dired-recursive-copies): 34 * dired.el (dired-recursive-deletes, dired-recursive-copies):
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 2749a6858c0..d33873d1689 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -1,6 +1,7 @@
1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*- 1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*-
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4;; 2007 Free Software Foundation, Inc.
4 5
5;; Author: Michael Albinus <michael.albinus@gmx.de> 6;; Author: Michael Albinus <michael.albinus@gmx.de>
6;; Keywords: comm, processes 7;; Keywords: comm, processes
@@ -31,12 +32,7 @@
31 32
32(require 'tramp) 33(require 'tramp)
33 34
34(eval-when-compile 35(eval-when-compile (require 'custom))
35 (require 'cl)
36 (require 'custom)
37 ;; Emacs 19.34 compatibility hack -- is this needed?
38 (or (>= emacs-major-version 20)
39 (load "cl-seq")))
40 36
41;; Disable Ange-FTP from file-name-handler-alist. 37;; Disable Ange-FTP from file-name-handler-alist.
42;; To handle EFS, the following functions need to be dealt with: 38;; To handle EFS, the following functions need to be dealt with:
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 5d5d441193d..7382bdef63b 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -31,12 +31,7 @@
31(require 'tramp) 31(require 'tramp)
32 32
33;; Pacify byte-compiler 33;; Pacify byte-compiler
34(eval-when-compile 34(eval-when-compile (require 'custom))
35 (require 'cl)
36 (require 'custom)
37 ;; Emacs 19.34 compatibility hack -- is this needed?
38 (or (>= emacs-major-version 20)
39 (load "cl-seq")))
40 35
41;; Avoid byte-compiler warnings if the byte-compiler supports this. 36;; Avoid byte-compiler warnings if the byte-compiler supports this.
42;; Currently, XEmacs supports this. 37;; Currently, XEmacs supports this.
diff --git a/lisp/net/tramp-util.el b/lisp/net/tramp-util.el
index 81857ae4225..4895edf019b 100644
--- a/lisp/net/tramp-util.el
+++ b/lisp/net/tramp-util.el
@@ -29,7 +29,6 @@
29 29
30;;; Code: 30;;; Code:
31 31
32(eval-when-compile (require 'cl))
33(require 'compile) 32(require 'compile)
34(require 'tramp) 33(require 'tramp)
35(add-hook 'tramp-util-unload-hook 34(add-hook 'tramp-util-unload-hook
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el
index ce047489260..32bb9857f7f 100644
--- a/lisp/net/tramp-uu.el
+++ b/lisp/net/tramp-uu.el
@@ -1,7 +1,8 @@
1;;; -*- coding: iso-2022-7bit; -*- 1;;; -*- coding: iso-2022-7bit; -*-
2;;; tramp-uu.el --- uuencode in Lisp 2;;; tramp-uu.el --- uuencode in Lisp
3 3
4;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
5;; 2007 Free Software Foundation, Inc.
5 6
6;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 7;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
7;; Keywords: comm, terminals 8;; Keywords: comm, terminals
diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el
index eda98364a98..cc5566d6354 100644
--- a/lisp/net/tramp-vc.el
+++ b/lisp/net/tramp-vc.el
@@ -31,8 +31,6 @@
31 31
32;;; Code: 32;;; Code:
33 33
34(eval-when-compile
35 (require 'cl))
36(require 'vc) 34(require 'vc)
37;; Old VC defines vc-rcs-release in vc.el, new VC requires extra module. 35;; Old VC defines vc-rcs-release in vc.el, new VC requires extra module.
38(unless (boundp 'vc-rcs-release) 36(unless (boundp 'vc-rcs-release)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 20ac73d0f75..f85620ee323 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -151,11 +151,7 @@ Otherwise, use a separate filename syntax for Tramp.")
151 (when (featurep 'tramp-smb) 151 (when (featurep 'tramp-smb)
152 (unload-feature 'tramp-smb 'force))))))) 152 (unload-feature 'tramp-smb 'force)))))))
153 153
154(require 'cl)
155(require 'custom) 154(require 'custom)
156;; Emacs 19.34 compatibility hack -- is this needed?
157(or (>= emacs-major-version 20)
158 (load "cl-seq"))
159 155
160(unless (boundp 'custom-print-functions) 156(unless (boundp 'custom-print-functions)
161 (defvar custom-print-functions nil)) ; not autoloaded before Emacs 20.4 157 (defvar custom-print-functions nil)) ; not autoloaded before Emacs 20.4
@@ -175,6 +171,11 @@ Otherwise, use a separate filename syntax for Tramp.")
175 (when (boundp 'byte-compile-not-obsolete-var) 171 (when (boundp 'byte-compile-not-obsolete-var)
176 (setq byte-compile-not-obsolete-var 'directory-sep-char))) 172 (setq byte-compile-not-obsolete-var 'directory-sep-char)))
177 173
174;; `set-buffer-multibyte' comes from Emacs Leim.
175(eval-and-compile
176 (unless (fboundp 'set-buffer-multibyte)
177 (defalias 'set-buffer-multibyte 'ignore)))
178
178;;; User Customizable Internal Variables: 179;;; User Customizable Internal Variables:
179 180
180(defgroup tramp nil 181(defgroup tramp nil
@@ -2077,7 +2078,9 @@ If VAR is nil, then we bind `v' to the structure and `multi-method',
2077 2078
2078(put 'with-parsed-tramp-file-name 'lisp-indent-function 2) 2079(put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
2079;; Enable debugging. 2080;; Enable debugging.
2080(def-edebug-spec with-parsed-tramp-file-name (form symbolp body)) 2081(eval-and-compile
2082 (when (featurep 'edebug)
2083 (def-edebug-spec with-parsed-tramp-file-name (form symbolp body))))
2081;; Highlight as keyword. 2084;; Highlight as keyword.
2082(when (functionp 'font-lock-add-keywords) 2085(when (functionp 'font-lock-add-keywords)
2083 (funcall 'font-lock-add-keywords 2086 (funcall 'font-lock-add-keywords
@@ -2384,10 +2387,10 @@ target of the symlink differ."
2384 "Integer constant overflow in reader") 2387 "Integer constant overflow in reader")
2385 (string-match 2388 (string-match
2386 "^[0-9]+\\([0-9][0-9][0-9][0-9][0-9]\\)\\'" 2389 "^[0-9]+\\([0-9][0-9][0-9][0-9][0-9]\\)\\'"
2387 (caddr err))) 2390 (car (cddr err))))
2388 (let* ((big (read (substring (caddr err) 0 2391 (let* ((big (read (substring (car (cddr err)) 0
2389 (match-beginning 1)))) 2392 (match-beginning 1))))
2390 (small (read (match-string 1 (caddr err)))) 2393 (small (read (match-string 1 (car (cddr err)))))
2391 (twiddle (/ small 65536))) 2394 (twiddle (/ small 65536)))
2392 (cons (+ big twiddle) 2395 (cons (+ big twiddle)
2393 (- small (* twiddle 65536)))))))) 2396 (- small (* twiddle 65536))))))))
@@ -2807,7 +2810,7 @@ of."
2807 object))) 2810 object)))
2808 (cell root)) 2811 (cell root))
2809 (while (cdr cell) 2812 (while (cdr cell)
2810 (if (and match (not (string-match match (caadr cell)))) 2813 (if (and match (not (string-match match (car (cadr cell)))))
2811 ;; Remove from list 2814 ;; Remove from list
2812 (setcdr cell (cddr cell)) 2815 (setcdr cell (cddr cell))
2813 ;; Include in list 2816 ;; Include in list
@@ -3426,10 +3429,10 @@ This is like `dired-recursive-delete-directory' for tramp files."
3426(defun tramp-handle-insert-directory 3429(defun tramp-handle-insert-directory
3427 (filename switches &optional wildcard full-directory-p) 3430 (filename switches &optional wildcard full-directory-p)
3428 "Like `insert-directory' for tramp files." 3431 "Like `insert-directory' for tramp files."
3429 (if (and (boundp 'ls-lisp-use-insert-directory-program) 3432 (if (and (featurep 'ls-lisp)
3430 (not (symbol-value 'ls-lisp-use-insert-directory-program))) 3433 (not (symbol-value 'ls-lisp-use-insert-directory-program)))
3431 (tramp-run-real-handler 'insert-directory 3434 (tramp-run-real-handler
3432 (list filename switches wildcard full-directory-p)) 3435 'insert-directory (list filename switches wildcard full-directory-p))
3433 ;; For the moment, we assume that the remote "ls" program does not 3436 ;; For the moment, we assume that the remote "ls" program does not
3434 ;; grok "--dired". In the future, we should detect this on 3437 ;; grok "--dired". In the future, we should detect this on
3435 ;; connection setup. 3438 ;; connection setup.
@@ -3869,12 +3872,7 @@ This will break if COMMAND prints a newline, followed by the value of
3869 "Like `file-remote-p' for tramp files." 3872 "Like `file-remote-p' for tramp files."
3870 (when (tramp-tramp-file-p filename) 3873 (when (tramp-tramp-file-p filename)
3871 (with-parsed-tramp-file-name filename nil 3874 (with-parsed-tramp-file-name filename nil
3872 (make-tramp-file-name 3875 (vector multi-method method user host ""))))
3873 :multi-method multi-method
3874 :method method
3875 :user user
3876 :host host
3877 :localname ""))))
3878 3876
3879(defun tramp-handle-insert-file-contents 3877(defun tramp-handle-insert-file-contents
3880 (filename &optional visit beg end replace) 3878 (filename &optional visit beg end replace)
@@ -3919,7 +3917,7 @@ This will break if COMMAND prints a newline, followed by the value of
3919 (when (boundp 'last-coding-system-used) 3917 (when (boundp 'last-coding-system-used)
3920 (set 'last-coding-system-used coding-system-used)) 3918 (set 'last-coding-system-used coding-system-used))
3921 (list (expand-file-name filename) 3919 (list (expand-file-name filename)
3922 (second result)))))) 3920 (cadr result))))))
3923 3921
3924 3922
3925(defun tramp-handle-find-backup-file-name (filename) 3923(defun tramp-handle-find-backup-file-name (filename)
@@ -3978,7 +3976,8 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3978 (when (and (string-match (car x) buffer-file-name) 3976 (when (and (string-match (car x) buffer-file-name)
3979 (not (car (cddr x)))) 3977 (not (car (cddr x))))
3980 (setq tramp-auto-save-directory 3978 (setq tramp-auto-save-directory
3981 (or tramp-auto-save-directory temporary-file-directory)))) 3979 (or tramp-auto-save-directory
3980 (tramp-temporary-file-directory)))))
3982 (symbol-value 'auto-save-file-name-transforms))) 3981 (symbol-value 'auto-save-file-name-transforms)))
3983 ;; Create directory. 3982 ;; Create directory.
3984 (when tramp-auto-save-directory 3983 (when tramp-auto-save-directory
@@ -4566,7 +4565,7 @@ Falls back to normal file name handler if no tramp file name handler exists."
4566 (member (match-string 1 file) (mapcar 'car tramp-methods))) 4565 (member (match-string 1 file) (mapcar 'car tramp-methods)))
4567 ((or (equal last-input-event 'tab) 4566 ((or (equal last-input-event 'tab)
4568 ;; Emacs 4567 ;; Emacs
4569 (and (wholenump last-input-event) 4568 (and (natnump last-input-event)
4570 (or 4569 (or
4571 ;; ?\t has event-modifier 'control 4570 ;; ?\t has event-modifier 'control
4572 (char-equal last-input-event ?\t) 4571 (char-equal last-input-event ?\t)
@@ -4575,6 +4574,10 @@ Falls back to normal file name handler if no tramp file name handler exists."
4575 (char-equal last-input-event ?\ ))))) 4574 (char-equal last-input-event ?\ )))))
4576 ;; XEmacs 4575 ;; XEmacs
4577 (and (featurep 'xemacs) 4576 (and (featurep 'xemacs)
4577 ;; `last-input-event' might be nil.
4578 (not (null last-input-event))
4579 ;; `last-input-event' may have no character approximation.
4580 (funcall (symbol-function 'event-to-character) last-input-event)
4578 (or 4581 (or
4579 ;; ?\t has event-modifier 'control 4582 ;; ?\t has event-modifier 'control
4580 (char-equal 4583 (char-equal
@@ -4771,24 +4774,14 @@ remote host and localname (filename on remote host)."
4771 (match-string (nth 1 structure) name))) 4774 (match-string (nth 1 structure) name)))
4772 (if (and method (member method tramp-multi-methods)) 4775 (if (and method (member method tramp-multi-methods))
4773 ;; Not handled (yet). 4776 ;; Not handled (yet).
4774 (make-tramp-file-name 4777 (vector method nil nil nil nil)
4775 :multi-method method
4776 :method nil
4777 :user nil
4778 :host nil
4779 :localname nil)
4780 (let ((user (and (nth 2 structure) 4778 (let ((user (and (nth 2 structure)
4781 (match-string (nth 2 structure) name))) 4779 (match-string (nth 2 structure) name)))
4782 (host (and (nth 3 structure) 4780 (host (and (nth 3 structure)
4783 (match-string (nth 3 structure) name))) 4781 (match-string (nth 3 structure) name)))
4784 (localname (and (nth 4 structure) 4782 (localname (and (nth 4 structure)
4785 (match-string (nth 4 structure) name)))) 4783 (match-string (nth 4 structure) name))))
4786 (make-tramp-file-name 4784 (vector nil method user host localname)))))))
4787 :multi-method nil
4788 :method method
4789 :user user
4790 :host host
4791 :localname localname)))))))
4792 4785
4793;; This function returns all possible method completions, adding the 4786;; This function returns all possible method completions, adding the
4794;; trailing method delimeter. 4787;; trailing method delimeter.
@@ -5191,7 +5184,7 @@ USER the array of user names, HOST the array of host names."
5191 (aref user i) (aref host i)) 5184 (aref user i) (aref host i))
5192 (format "%s@%s:" (aref method i) (aref host i))) 5185 (format "%s@%s:" (aref method i) (aref host i)))
5193 string-list)) 5186 string-list))
5194 (incf i)) 5187 (setq i (1+ i)))
5195 (format "*%s/%s %s*" 5188 (format "*%s/%s %s*"
5196 prefix multi-method 5189 prefix multi-method
5197 (apply 'concat (reverse string-list))))) 5190 (apply 'concat (reverse string-list)))))
@@ -5928,7 +5921,7 @@ log in as u2 to h2."
5928 ;; is done here. 5921 ;; is done here.
5929 (funcall multi-func p m u h command) 5922 (funcall multi-func p m u h command)
5930 (erase-buffer) 5923 (erase-buffer)
5931 (incf i))) 5924 (setq i (1+ i))))
5932 (tramp-open-connection-setup-interactive-shell 5925 (tramp-open-connection-setup-interactive-shell
5933 p multi-method method user host) 5926 p multi-method method user host)
5934 (tramp-post-connection multi-method method user host))))) 5927 (tramp-post-connection multi-method method user host)))))
@@ -6824,7 +6817,8 @@ If `tramp-discard-garbage' is nil, just erase buffer."
6824 6817
6825(defun tramp-mode-string-to-int (mode-string) 6818(defun tramp-mode-string-to-int (mode-string)
6826 "Converts a ten-letter `drwxrwxrwx'-style mode string into mode bits." 6819 "Converts a ten-letter `drwxrwxrwx'-style mode string into mode bits."
6827 (let* ((mode-chars (string-to-vector mode-string)) 6820 (let* (case-fold-search
6821 (mode-chars (string-to-vector mode-string))
6828 (owner-read (aref mode-chars 1)) 6822 (owner-read (aref mode-chars 1))
6829 (owner-write (aref mode-chars 2)) 6823 (owner-write (aref mode-chars 2))
6830 (owner-execute-or-setid (aref mode-chars 3)) 6824 (owner-execute-or-setid (aref mode-chars 3))
@@ -6836,45 +6830,61 @@ If `tramp-discard-garbage' is nil, just erase buffer."
6836 (other-execute-or-sticky (aref mode-chars 9))) 6830 (other-execute-or-sticky (aref mode-chars 9)))
6837 (save-match-data 6831 (save-match-data
6838 (logior 6832 (logior
6839 (case owner-read 6833 (cond
6840 (?r (tramp-octal-to-decimal "00400")) (?- 0) 6834 ((char-equal owner-read ?r) (tramp-octal-to-decimal "00400"))
6841 (t (error "Second char `%c' must be one of `r-'" owner-read))) 6835 ((char-equal owner-read ?-) 0)
6842 (case owner-write 6836 (t (error "Second char `%c' must be one of `r-'" owner-read)))
6843 (?w (tramp-octal-to-decimal "00200")) (?- 0) 6837 (cond
6844 (t (error "Third char `%c' must be one of `w-'" owner-write))) 6838 ((char-equal owner-write ?w) (tramp-octal-to-decimal "00200"))
6845 (case owner-execute-or-setid 6839 ((char-equal owner-write ?-) 0)
6846 (?x (tramp-octal-to-decimal "00100")) 6840 (t (error "Third char `%c' must be one of `w-'" owner-write)))
6847 (?S (tramp-octal-to-decimal "04000")) 6841 (cond
6848 (?s (tramp-octal-to-decimal "04100")) 6842 ((char-equal owner-execute-or-setid ?x)
6849 (?- 0) 6843 (tramp-octal-to-decimal "00100"))
6850 (t (error "Fourth char `%c' must be one of `xsS-'" 6844 ((char-equal owner-execute-or-setid ?S)
6851 owner-execute-or-setid))) 6845 (tramp-octal-to-decimal "04000"))
6852 (case group-read 6846 ((char-equal owner-execute-or-setid ?s)
6853 (?r (tramp-octal-to-decimal "00040")) (?- 0) 6847 (tramp-octal-to-decimal "04100"))
6854 (t (error "Fifth char `%c' must be one of `r-'" group-read))) 6848 ((char-equal owner-execute-or-setid ?-) 0)
6855 (case group-write 6849 (t (error "Fourth char `%c' must be one of `xsS-'"
6856 (?w (tramp-octal-to-decimal "00020")) (?- 0) 6850 owner-execute-or-setid)))
6857 (t (error "Sixth char `%c' must be one of `w-'" group-write))) 6851 (cond
6858 (case group-execute-or-setid 6852 ((char-equal group-read ?r) (tramp-octal-to-decimal "00040"))
6859 (?x (tramp-octal-to-decimal "00010")) 6853 ((char-equal group-read ?-) 0)
6860 (?S (tramp-octal-to-decimal "02000")) 6854 (t (error "Fifth char `%c' must be one of `r-'" group-read)))
6861 (?s (tramp-octal-to-decimal "02010")) 6855 (cond
6862 (?- 0) 6856 ((char-equal group-write ?w) (tramp-octal-to-decimal "00020"))
6863 (t (error "Seventh char `%c' must be one of `xsS-'" 6857 ((char-equal group-write ?-) 0)
6864 group-execute-or-setid))) 6858 (t (error "Sixth char `%c' must be one of `w-'" group-write)))
6865 (case other-read 6859 (cond
6866 (?r (tramp-octal-to-decimal "00004")) (?- 0) 6860 ((char-equal group-execute-or-setid ?x)
6867 (t (error "Eighth char `%c' must be one of `r-'" other-read))) 6861 (tramp-octal-to-decimal "00010"))
6868 (case other-write 6862 ((char-equal group-execute-or-setid ?S)
6869 (?w (tramp-octal-to-decimal "00002")) (?- 0) 6863 (tramp-octal-to-decimal "02000"))
6864 ((char-equal group-execute-or-setid ?s)
6865 (tramp-octal-to-decimal "02010"))
6866 ((char-equal group-execute-or-setid ?-) 0)
6867 (t (error "Seventh char `%c' must be one of `xsS-'"
6868 group-execute-or-setid)))
6869 (cond
6870 ((char-equal other-read ?r)
6871 (tramp-octal-to-decimal "00004"))
6872 ((char-equal other-read ?-) 0)
6873 (t (error "Eighth char `%c' must be one of `r-'" other-read)))
6874 (cond
6875 ((char-equal other-write ?w) (tramp-octal-to-decimal "00002"))
6876 ((char-equal other-write ?-) 0)
6870 (t (error "Nineth char `%c' must be one of `w-'" other-write))) 6877 (t (error "Nineth char `%c' must be one of `w-'" other-write)))
6871 (case other-execute-or-sticky 6878 (cond
6872 (?x (tramp-octal-to-decimal "00001")) 6879 ((char-equal other-execute-or-sticky ?x)
6873 (?T (tramp-octal-to-decimal "01000")) 6880 (tramp-octal-to-decimal "00001"))
6874 (?t (tramp-octal-to-decimal "01001")) 6881 ((char-equal other-execute-or-sticky ?T)
6875 (?- 0) 6882 (tramp-octal-to-decimal "01000"))
6876 (t (error "Tenth char `%c' must be one of `xtT-'" 6883 ((char-equal other-execute-or-sticky ?t)
6877 other-execute-or-sticky))))))) 6884 (tramp-octal-to-decimal "01001"))
6885 ((char-equal other-execute-or-sticky ?-) 0)
6886 (t (error "Tenth char `%c' must be one of `xtT-'"
6887 other-execute-or-sticky)))))))
6878 6888
6879(defun tramp-convert-file-attributes (multi-method method user host attr) 6889(defun tramp-convert-file-attributes (multi-method method user host attr)
6880 "Convert file-attributes ATTR generated by perl script or ls. 6890 "Convert file-attributes ATTR generated by perl script or ls.
@@ -6977,7 +6987,29 @@ Not actually used. Use `(format \"%o\" i)' instead?"
6977;; internal data structure. Convenience functions for internal 6987;; internal data structure. Convenience functions for internal
6978;; data structure. 6988;; data structure.
6979 6989
6980(defstruct tramp-file-name multi-method method user host localname) 6990(defun tramp-file-name-p (obj)
6991 "Check whether TRAMP-FILE-NAME is a Tramp object."
6992 (and (vectorp obj) (= 5 (length obj))))
6993
6994(defun tramp-file-name-multi-method (obj)
6995 "Return MULTI-METHOD component of TRAMP-FILE-NAME."
6996 (and (tramp-file-name-p obj) (aref obj 0)))
6997
6998(defun tramp-file-name-method (obj)
6999 "Return METHOD component of TRAMP-FILE-NAME."
7000 (and (tramp-file-name-p obj) (aref obj 1)))
7001
7002(defun tramp-file-name-user (obj)
7003 "Return USER component of TRAMP-FILE-NAME."
7004 (and (tramp-file-name-p obj) (aref obj 2)))
7005
7006(defun tramp-file-name-host (obj)
7007 "Return HOST component of TRAMP-FILE-NAME."
7008 (and (tramp-file-name-p obj) (aref obj 3)))
7009
7010(defun tramp-file-name-localname (obj)
7011 "Return LOCALNAME component of TRAMP-FILE-NAME."
7012 (and (tramp-file-name-p obj) (aref obj 4)))
6981 7013
6982(defun tramp-tramp-file-p (name) 7014(defun tramp-tramp-file-p (name)
6983 "Return t iff NAME is a tramp file." 7015 "Return t iff NAME is a tramp file."
@@ -7010,12 +7042,7 @@ localname (file name on remote host)."
7010 (let ((user (match-string (nth 2 tramp-file-name-structure) name)) 7042 (let ((user (match-string (nth 2 tramp-file-name-structure) name))
7011 (host (match-string (nth 3 tramp-file-name-structure) name)) 7043 (host (match-string (nth 3 tramp-file-name-structure) name))
7012 (localname (match-string (nth 4 tramp-file-name-structure) name))) 7044 (localname (match-string (nth 4 tramp-file-name-structure) name)))
7013 (make-tramp-file-name 7045 (vector nil method (or user nil) host localname))))))
7014 :multi-method nil
7015 :method method
7016 :user (or user nil)
7017 :host host
7018 :localname localname))))))
7019 7046
7020(defun tramp-find-default-method (user host) 7047(defun tramp-find-default-method (user host)
7021 "Look up the right method to use in `tramp-default-method-alist'." 7048 "Look up the right method to use in `tramp-default-method-alist'."
@@ -7055,7 +7082,7 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
7055 (setq method (match-string method-index name)) 7082 (setq method (match-string method-index name))
7056 (setq hops (match-string hops-index name)) 7083 (setq hops (match-string hops-index name))
7057 (setq len (/ (length (match-data t)) 2)) 7084 (setq len (/ (length (match-data t)) 2))
7058 (when (< localname-index 0) (incf localname-index len)) 7085 (when (< localname-index 0) (setq localname-index (+ localname-index len)))
7059 (setq localname (match-string localname-index name)) 7086 (setq localname (match-string localname-index name))
7060 (let ((index 0)) 7087 (let ((index 0))
7061 (while (string-match hop-regexp hops index) 7088 (while (string-match hop-regexp hops index)
@@ -7066,12 +7093,12 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
7066 (cons (match-string hop-user-index hops) hop-users)) 7093 (cons (match-string hop-user-index hops) hop-users))
7067 (setq hop-hosts 7094 (setq hop-hosts
7068 (cons (match-string hop-host-index hops) hop-hosts)))) 7095 (cons (match-string hop-host-index hops) hop-hosts))))
7069 (make-tramp-file-name 7096 (vector
7070 :multi-method method 7097 method
7071 :method (apply 'vector (reverse hop-methods)) 7098 (apply 'vector (reverse hop-methods))
7072 :user (apply 'vector (reverse hop-users)) 7099 (apply 'vector (reverse hop-users))
7073 :host (apply 'vector (reverse hop-hosts)) 7100 (apply 'vector (reverse hop-hosts))
7074 :localname localname))) 7101 localname)))
7075 7102
7076(defun tramp-make-tramp-file-name (multi-method method user host localname) 7103(defun tramp-make-tramp-file-name (multi-method method user host localname)
7077 "Constructs a tramp file name from METHOD, USER, HOST and LOCALNAME." 7104 "Constructs a tramp file name from METHOD, USER, HOST and LOCALNAME."
@@ -7103,7 +7130,7 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
7103 (let ((m (aref method i)) (u (aref user i)) (h (aref host i))) 7130 (let ((m (aref method i)) (u (aref user i)) (h (aref host i)))
7104 (setq hops (concat hops (format-spec hop-format 7131 (setq hops (concat hops (format-spec hop-format
7105 `((?m . ,m) (?u . ,u) (?h . ,h))))) 7132 `((?m . ,m) (?u . ,u) (?h . ,h)))))
7106 (incf i))) 7133 (setq i (1+ i))))
7107 (concat prefix hops localname))) 7134 (concat prefix hops localname)))
7108 7135
7109(defun tramp-make-copy-program-file-name (user host localname) 7136(defun tramp-make-copy-program-file-name (user host localname)
@@ -7218,7 +7245,7 @@ as default."
7218 (assoc (tramp-find-method multi-method method user host) 7245 (assoc (tramp-find-method multi-method method user host)
7219 tramp-methods)))) 7246 tramp-methods))))
7220 (if entry 7247 (if entry
7221 (second entry) 7248 (cadr entry)
7222 (symbol-value param)))) 7249 (symbol-value param))))
7223 7250
7224 7251
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 04f7bc754f2..485c58afa65 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,7 +30,7 @@
30;; are auto-frobbed from configure.ac, so you should edit that file and run 30;; are auto-frobbed from configure.ac, so you should edit that file and run
31;; "autoconf && ./configure" to change them. 31;; "autoconf && ./configure" to change them.
32 32
33(defconst tramp-version "2.0.55" 33(defconst tramp-version "2.0.56"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
diff --git a/man/ChangeLog b/man/ChangeLog
index f9459bfcc2d..98faf2482b1 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,10 @@
12007-06-07 Michael Albinus <michael.albinus@gmx.de>
2
3 Sync with Tramp 2.0.56.
4
5 * tramp.texi (Frequently Asked Questions): Improve ~/.zshrc
6 settings. Reported by Ted Zlatanov <tzz@lifelogs.com>.
7
12007-06-07 Alan Mackenzie <acm@muc.de> 82007-06-07 Alan Mackenzie <acm@muc.de>
2 9
3 * display.texi (Optional Mode Line): Document the new form of 10 * display.texi (Optional Mode Line): Document the new form of
diff --git a/man/tramp.texi b/man/tramp.texi
index 7acef2663e4..67b0647787c 100644
--- a/man/tramp.texi
+++ b/man/tramp.texi
@@ -2051,7 +2051,11 @@ setting the regular expression detecting the prompt.
2051A special problem is the zsh, which uses left-hand side and right-hand 2051A special problem is the zsh, which uses left-hand side and right-hand
2052side prompts in parallel. Therefore, it is necessary to disable the 2052side prompts in parallel. Therefore, it is necessary to disable the
2053zsh line editor on the remote host. You shall add to @file{~/.zshrc} 2053zsh line editor on the remote host. You shall add to @file{~/.zshrc}
2054the following command: @command{[ $TERM = "dumb" ] && unsetopt zle}. 2054the following command:
2055
2056@example
2057[ $TERM = "dumb" ] && unsetopt zle && PS1='$ '
2058@end example
2055 2059
2056@item 2060@item
2057@value{tramp} doesn't transfer strings with more than 500 characters 2061@value{tramp} doesn't transfer strings with more than 500 characters
diff --git a/man/trampver.texi b/man/trampver.texi
index c512de4c74b..6c770dc8ad1 100644
--- a/man/trampver.texi
+++ b/man/trampver.texi
@@ -9,7 +9,7 @@
9@c In the Tramp CVS, the version number is auto-frobbed from 9@c In the Tramp CVS, the version number is auto-frobbed from
10@c configure.ac, so you should edit that file and run 10@c configure.ac, so you should edit that file and run
11@c "autoconf && ./configure" to change the version number. 11@c "autoconf && ./configure" to change the version number.
12@set trampver 2.0.55 12@set trampver 2.0.56
13 13
14@c Other flags from configuration 14@c Other flags from configuration
15@set prefix /usr/local 15@set prefix /usr/local