/[emacs]/emacs/lisp/net/tramp.el
ViewVC logotype

Diff of /emacs/lisp/net/tramp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by kai, Sat Jul 13 17:41:01 2002 UTC revision 1.11 by kai, Sun Jul 21 13:49:05 2002 UTC
# Line 69  Line 69 
69    
70  ;;; Code:  ;;; Code:
71    
72  (defconst tramp-version "2.0.1"  (defconst tramp-version "2.0.2"
73    "This version of tramp.")    "This version of tramp.")
74  (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"  (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
75    "Email address to send bug reports to.")    "Email address to send bug reports to.")
# Line 131  use for the remote host." Line 131  use for the remote host."
131    :group 'tramp    :group 'tramp
132    :type '(file :must-match t))    :type '(file :must-match t))
133    
134    (defcustom tramp-multi-sh-program
135      (if (memq system-type '(windows-nt))
136          "cmd.exe"
137        tramp-sh-program)
138      "*Use this program for bootstrapping multi-hop connections.
139    This variable is similar to `tramp-sh-program', but it is only used
140    when initializing a multi-hop connection.  Therefore, the set of
141    commands sent to this shell is quite restricted, and if you are
142    careful it works to use CMD.EXE under Windows (instead of a Bourne-ish
143    shell which does not normally exist on Windows anyway).
144    
145    To use multi-hop methods from Windows, you also need suitable entries
146    in `tramp-multi-connection-function-alist' for the first hop.
147    
148    This variable defaults to CMD.EXE on Windows NT, and to the value of
149    `tramp-sh-program' on other systems."
150      :group 'tramp
151      :type '(file :must-match t))
152    
153  ;; CCC I have changed all occurrences of comint-quote-filename with  ;; CCC I have changed all occurrences of comint-quote-filename with
154  ;; tramp-shell-quote-argument, except in tramp-handle-expand-many-files.  ;; tramp-shell-quote-argument, except in tramp-handle-expand-many-files.
155  ;; There, comint-quote-filename was removed altogether.  If it turns  ;; There, comint-quote-filename was removed altogether.  If it turns
# Line 178  use for the remote host." Line 197  use for the remote host."
197                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
198                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
199       ("scp1"  (tramp-connection-function  tramp-open-connection-rsh)       ("scp1"  (tramp-connection-function  tramp-open-connection-rsh)
200                  (tramp-rsh-program          "ssh")
201                  (tramp-rcp-program          "scp")
202                  (tramp-remote-sh            "/bin/sh")
203                  (tramp-rsh-args             ("-1" "-e" "none"))
204                  (tramp-rcp-args             ("-1"))
205                  (tramp-rcp-keep-date-arg    "-p")
206                  (tramp-su-program           nil)
207                  (tramp-su-args              nil)
208                  (tramp-encoding-command     nil)
209                  (tramp-decoding-command     nil)
210                  (tramp-encoding-function    nil)
211                  (tramp-decoding-function    nil)
212                  (tramp-telnet-program       nil)
213                  (tramp-telnet-args          nil))
214         ("scp2"  (tramp-connection-function  tramp-open-connection-rsh)
215                  (tramp-rsh-program          "ssh")
216                  (tramp-rcp-program          "scp")
217                  (tramp-remote-sh            "/bin/sh")
218                  (tramp-rsh-args             ("-2" "-e" "none"))
219                  (tramp-rcp-args             ("-2"))
220                  (tramp-rcp-keep-date-arg    "-p")
221                  (tramp-su-program           nil)
222                  (tramp-su-args              nil)
223                  (tramp-encoding-command     nil)
224                  (tramp-decoding-command     nil)
225                  (tramp-encoding-function    nil)
226                  (tramp-decoding-function    nil)
227                  (tramp-telnet-program       nil)
228                  (tramp-telnet-args          nil))
229         ("scp-ssh1" (tramp-connection-function  tramp-open-connection-rsh)
230                (tramp-rsh-program          "ssh1")                (tramp-rsh-program          "ssh1")
231                (tramp-rcp-program          "scp1")                (tramp-rcp-program          "scp1")
232                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 192  use for the remote host." Line 241  use for the remote host."
241                (tramp-decoding-function    nil)                (tramp-decoding-function    nil)
242                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
243                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
244       ("scp2"  (tramp-connection-function  tramp-open-connection-rsh)       ("scp-ssh2"  (tramp-connection-function  tramp-open-connection-rsh)
245                (tramp-rsh-program          "ssh2")                (tramp-rsh-program          "ssh2")
246                (tramp-rcp-program          "scp2")                (tramp-rcp-program          "scp2")
247                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 255  use for the remote host." Line 304  use for the remote host."
304                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
305                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
306       ("su1"   (tramp-connection-function  tramp-open-connection-rsh)       ("su1"   (tramp-connection-function  tramp-open-connection-rsh)
307                  (tramp-rsh-program          "ssh")
308                  (tramp-rcp-program          nil)
309                  (tramp-remote-sh            "/bin/sh")
310                  (tramp-rsh-args             ("-1" "-e" "none"))
311                  (tramp-rcp-args             ("-1"))
312                  (tramp-rcp-keep-date-arg    nil)
313                  (tramp-su-program           nil)
314                  (tramp-su-args              nil)
315                  (tramp-encoding-command     "uuencode xxx")
316                  (tramp-decoding-command
317                   "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
318                  (tramp-encoding-function    nil)
319                  (tramp-decoding-function    uudecode-decode-region)
320                  (tramp-telnet-program       nil)
321                  (tramp-telnet-args          nil))
322         ("su2"   (tramp-connection-function  tramp-open-connection-rsh)
323                  (tramp-rsh-program          "ssh")
324                  (tramp-rcp-program          nil)
325                  (tramp-remote-sh            "/bin/sh")
326                  (tramp-rsh-args             ("-2" "-e" "none"))
327                  (tramp-rcp-args             ("-2"))
328                  (tramp-rcp-keep-date-arg    nil)
329                  (tramp-su-program           nil)
330                  (tramp-su-args              nil)
331                  (tramp-encoding-command     "uuencode xxx")
332                  (tramp-decoding-command
333                   "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
334                  (tramp-encoding-function    nil)
335                  (tramp-decoding-function    uudecode-decode-region)
336                  (tramp-telnet-program       nil)
337                  (tramp-telnet-args          nil))
338         ("su-ssh1"   (tramp-connection-function  tramp-open-connection-rsh)
339                (tramp-rsh-program          "ssh1")                (tramp-rsh-program          "ssh1")
340                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
341                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 270  use for the remote host." Line 351  use for the remote host."
351                (tramp-decoding-function    uudecode-decode-region)                (tramp-decoding-function    uudecode-decode-region)
352                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
353                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
354       ("su2"   (tramp-connection-function  tramp-open-connection-rsh)       ("su-ssh2"   (tramp-connection-function  tramp-open-connection-rsh)
355                (tramp-rsh-program          "ssh2")                (tramp-rsh-program          "ssh2")
356                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
357                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 331  use for the remote host." Line 412  use for the remote host."
412                (tramp-decoding-function    base64-decode-region)                (tramp-decoding-function    base64-decode-region)
413                (tramp-telnet-program       nil))                (tramp-telnet-program       nil))
414       ("sm1"   (tramp-connection-function  tramp-open-connection-rsh)       ("sm1"   (tramp-connection-function  tramp-open-connection-rsh)
415                  (tramp-rsh-program          "ssh")
416                  (tramp-rcp-program          nil)
417                  (tramp-remote-sh            "/bin/sh")
418                  (tramp-rsh-args             ("-1" "-e" "none"))
419                  (tramp-rcp-args             ("-1"))
420                  (tramp-rcp-keep-date-arg    nil)
421                  (tramp-su-program           nil)
422                  (tramp-su-args              nil)
423                  (tramp-encoding-command     "mimencode -b")
424                  (tramp-decoding-command     "mimencode -u -b")
425                  (tramp-encoding-function    base64-encode-region)
426                  (tramp-decoding-function    base64-decode-region)
427                  (tramp-telnet-program       nil)
428                  (tramp-telnet-args          nil))
429         ("sm2"   (tramp-connection-function  tramp-open-connection-rsh)
430                  (tramp-rsh-program          "ssh")
431                  (tramp-rcp-program          nil)
432                  (tramp-remote-sh            "/bin/sh")
433                  (tramp-rsh-args             ("-2" "-e" "none"))
434                  (tramp-rcp-args             ("-2"))
435                  (tramp-rcp-keep-date-arg    nil)
436                  (tramp-su-program           nil)
437                  (tramp-su-args              nil)
438                  (tramp-encoding-command     "mimencode -b")
439                  (tramp-decoding-command     "mimencode -u -b")
440                  (tramp-encoding-function    base64-encode-region)
441                  (tramp-decoding-function    base64-decode-region)
442                  (tramp-telnet-program       nil)
443                  (tramp-telnet-args          nil))
444         ("sm-ssh1"   (tramp-connection-function  tramp-open-connection-rsh)
445                (tramp-rsh-program          "ssh1")                (tramp-rsh-program          "ssh1")
446                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
447                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 345  use for the remote host." Line 456  use for the remote host."
456                (tramp-decoding-function    base64-decode-region)                (tramp-decoding-function    base64-decode-region)
457                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
458                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
459       ("sm2"   (tramp-connection-function  tramp-open-connection-rsh)       ("sm-ssh2"   (tramp-connection-function  tramp-open-connection-rsh)
460                (tramp-rsh-program          "ssh2")                (tramp-rsh-program          "ssh2")
461                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
462                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 1032  Also see `tramp-make-tramp-file-format', Line 1143  Also see `tramp-make-tramp-file-format',
1143  Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and Tramp.  Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and Tramp.
1144  See `tramp-file-name-structure-unified' for details.")  See `tramp-file-name-structure-unified' for details.")
1145    
1146  (defconst tramp-file-name-structure-separate  (defconst tramp-multi-file-name-structure-separate
1147    (list (concat    (list (concat
1148           ;; prefix           ;; prefix
1149           "\\`/\\[\\(\\([a-z0-9]+\\)?\\)"           "\\`/\\[\\(\\([a-z0-9]+\\)?\\)"
# Line 2287  and `rename'.  FILENAME and NEWNAME must Line 2398  and `rename'.  FILENAME and NEWNAME must
2398      (when (file-exists-p newname)      (when (file-exists-p newname)
2399        (signal 'file-already-exists        (signal 'file-already-exists
2400                (list newname))))                (list newname))))
2401    (with-parsed-tramp-file-name filename v1    (let ((t1 (tramp-tramp-file-p filename))
2402      (with-parsed-tramp-file-name newname v2          (t2 (tramp-tramp-file-p newname)))
2403        (when (and (tramp-ange-ftp-file-name-p v1-multi-method v1-method)      ;; Check which ones of source and target are Tramp files.
2404                   (tramp-ange-ftp-file-name-p v2-multi-method v2-method))      (cond
2405          (tramp-invoke-ange-ftp       ((and t1 t2)
2406                                 (if (eq op 'copy) 'copy-file 'rename-file)        ;; Both are Tramp files.
2407                                 filename newname ok-if-already-exists keep-date))        (with-parsed-tramp-file-name filename v1
2408        (let* ((mmeth (tramp-file-name-multi-method (or v1 v2)))          (with-parsed-tramp-file-name newname v2
2409               (meth (tramp-file-name-method (or v1 v2)))            ;; Possibly invoke Ange-FTP.
2410               (rcp-program (tramp-get-rcp-program mmeth meth))            (when (and (tramp-ange-ftp-file-name-p v1-multi-method v1-method)
2411               (rcp-args (tramp-get-rcp-args mmeth meth))                       (tramp-ange-ftp-file-name-p v2-multi-method v2-method))
2412               (trampbuf (get-buffer-create "*tramp output*")))              (tramp-invoke-ange-ftp
2413          ;; Check if we can use a shortcut.               (if (eq op 'copy) 'copy-file 'rename-file)
2414          (if (and v1-method v2-method               filename newname ok-if-already-exists keep-date))
2415                   (equal v1-multi-method v2-multi-method)            ;; Check if we can use a shortcut.
2416                   (equal v1-method v2-method)            (if (and (equal v1-multi-method v2-multi-method)
2417                   (equal v1-host v2-host)                     (equal v1-method v2-method)
2418                   (equal v1-user v2-user))                     (equal v1-host v2-host)
2419              ;; Shortcut: if method, host, user are the same for both                     (equal v1-user v2-user))
2420              ;; files, we invoke `cp' or `mv' on the remote host directly.                ;; Shortcut: if method, host, user are the same for both
2421              (tramp-do-copy-or-rename-file-directly                ;; files, we invoke `cp' or `mv' on the remote host
2422               op                ;; directly.
2423               v1-multi-method v1-method v1-user v1-host v1-path v2-path                (tramp-do-copy-or-rename-file-directly
2424               keep-date)                 op v1-multi-method v1-method v1-user v1-host
2425            ;; New algorithm: copy file first.  Then, if operation is                 v1-path v2-path keep-date)
2426            ;; `rename', go back and delete the original file if the copy              ;; The shortcut was not possible.  So we copy the
2427            ;; was successful.              ;; file first.  If the operation was `rename', we go
2428            (if rcp-program              ;; back and delete the original file (if the copy was
2429                ;; The following code uses a tramp program to copy the file.              ;; successful).  The approach is simple-minded: we
2430                (let ((f1 (if (not v1)              ;; create a new buffer, insert the contents of the
2431                              filename              ;; source file into it, then write out the buffer to
2432                            (tramp-make-rcp-program-file-name              ;; the target file.  The advantage is that it doesn't
2433                             v1-user v1-host              ;; matter which filename handlers are used for the
2434                             (tramp-shell-quote-argument v1-path))))              ;; source and target file.
2435                      (f2 (if (not v2)  
2436                              newname              ;; CCC: If both source and target are Tramp files,
2437                            (tramp-make-rcp-program-file-name              ;; and both are using the same rcp-program, then we
2438                             v2-user v2-host              ;; can invoke rcp directly.  Note that
2439                             (tramp-shell-quote-argument v2-path))))              ;; default-directory should point to a local
2440                      (default-directory              ;; directory if we want to invoke rcp.
2441                        (if (tramp-tramp-file-p default-directory)              (tramp-do-copy-or-rename-via-buffer
2442                            (tramp-temporary-file-directory)               op filename newname keep-date)))))
2443                          default-directory)))            ((or t1 t2)
2444                  (when keep-date             ;; Use the generic method via a Tramp buffer.
2445                    (add-to-list 'rcp-args             (tramp-do-copy-or-rename-via-buffer op filename newname keep-date))
2446                                 (tramp-get-rcp-keep-date-arg mmeth meth)))            (t
2447                  (save-excursion (set-buffer trampbuf) (erase-buffer))             ;; One of them must be a Tramp file.
2448                  (unless (equal 0 (apply #'call-process             (error "Tramp implementation says this cannot happen")))))
2449                                          (tramp-get-rcp-program mmeth meth)  
2450                                          nil trampbuf nil  (defun tramp-do-copy-or-rename-via-buffer (op filename newname keep-date)
2451                                          (append rcp-args (list f1 f2))))    "Use an Emacs buffer to copy or rename a file.
2452                    (pop-to-buffer trampbuf)  First arg OP is either `copy' or `rename' and indicates the operation.
2453                    (error (concat "tramp-do-copy-or-rename-file: %s"  FILENAME is the source file, NEWNAME the target file.
2454                                   " didn't work, see buffer `%s' for details")  KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
2455                           (tramp-get-rcp-program mmeth meth) trampbuf)))    (let ((trampbuf (get-buffer-create "*tramp output*")))
2456              ;; The following code uses an inline method for copying.      (when keep-date
2457              ;; Let's start with a simple-minded approach: we create a new        (tramp-message
2458              ;; buffer, insert the contents of the source file into it,         1 (concat "Warning: cannot preserve file time stamp"
2459              ;; then write out the buffer.  This should work fine, whether                   " with inline copying across machines")))
2460              ;; the source or the target files are tramp files.      (save-excursion
2461              ;; CCC TODO: error checking        (set-buffer trampbuf) (erase-buffer)
2462              (when keep-date        (insert-file-contents-literally filename)
2463                (tramp-message        (let ((coding-system-for-write 'no-conversion))
2464                 1 (concat "Warning: cannot preserve file time stamp"          (write-region (point-min) (point-max) newname)))
2465                           " with inline copying across machines")))      ;; If the operation was `rename', delete the original file.
2466              (save-excursion      (unless (eq op 'copy)
2467                (set-buffer trampbuf) (erase-buffer)        (delete-file filename))))
               (insert-file-contents-literally filename)  
               (let ((coding-system-for-write 'no-conversion))  
                 (write-region (point-min) (point-max) newname))))  
   
           ;; If the operation was `rename', delete the original file.  
           (unless (eq op 'copy)  
             (delete-file filename)))))))  
2468    
2469  (defun tramp-do-copy-or-rename-file-directly  (defun tramp-do-copy-or-rename-file-directly
2470    (op multi-method method user host path1 path2 keep-date)    (op multi-method method user host path1 path2 keep-date)
# Line 3771  at all unlikely that this variable is se Line 3875  at all unlikely that this variable is se
3875                         (tramp-get-su-program multi-method method)                         (tramp-get-su-program multi-method method)
3876                         (mapcar                         (mapcar
3877                          '(lambda (x)                          '(lambda (x)
3878                             (format-spec                             (format-spec x `((?u ,user))))
                             x (list (cons ?u user))))  
3879                          (tramp-get-su-args multi-method method))))                          (tramp-get-su-args multi-method method))))
3880               (found nil)               (found nil)
3881               (pw nil))               (pw nil))
# Line 3847  log in as u2 to h2." Line 3950  log in as u2 to h2."
3950                                         tramp-dos-coding-system))                                         tramp-dos-coding-system))
3951               (p (start-process (tramp-buffer-name multi-method method user host)               (p (start-process (tramp-buffer-name multi-method method user host)
3952                                 (tramp-get-buffer multi-method method user host)                                 (tramp-get-buffer multi-method method user host)
3953                                 tramp-sh-program))                                 tramp-multi-sh-program))
3954               (num-hops (length method))               (num-hops (length method))
3955               (i 0))               (i 0))
3956          (process-kill-without-query p)          (process-kill-without-query p)
# Line 3887  set in `tramp-rsh-end-of-line'.  Use `%% Line 3990  set in `tramp-rsh-end-of-line'.  Use `%%
3990  character.  character.
3991    
3992  If USER is nil, uses the return value of (user-login-name) instead."  If USER is nil, uses the return value of (user-login-name) instead."
3993    (let ((cmd (format-spec command (list (cons ?h host)    (let ((cmd (format-spec command `((?h ,host) (?n ,tramp-rsh-end-of-line))))
3994                                          (cons ?n tramp-rsh-end-of-line))))          (cmd1 (format-spec command `((?h ,host) (?n ""))))
         (cmd1 (format-spec command (list (cons ?h host)  
                                          (cons ?n ""))))  
3995          found pw)          found pw)
3996      (erase-buffer)      (erase-buffer)
3997      (tramp-message 9 "Sending telnet command `%s'" cmd1)      (tramp-message 9 "Sending telnet command `%s'" cmd1)
# Line 3939  will be replaced with the value of `tram Line 4040  will be replaced with the value of `tram
4040  `%%' if you want to use a literal percent character.  `%%' if you want to use a literal percent character.
4041    
4042  If USER is nil, uses the return value of (user-login-name) instead."  If USER is nil, uses the return value of (user-login-name) instead."
4043    (let ((cmd (format-spec command (list (cons ?h host)    (let ((cmd (format-spec command `((?h ,host)
4044                                          (cons ?u (or user (user-login-name)))                                      (?u ,(or user (user-login-name)))
4045                                          (cons ?n tramp-rsh-end-of-line))))                                      (?n ,tramp-rsh-end-of-line))))
4046          (cmd1 (format-spec command (list (cons ?h host)          (cmd1 (format-spec command `((?h ,host)
4047                                           (cons ?u (or user (user-login-name)))                                       (?u ,(or user (user-login-name)))
4048                                           (cons ?n ""))))                                       (?n ""))))
4049          found)          found)
4050      (erase-buffer)      (erase-buffer)
4051      (tramp-message 9 "Sending rlogin command `%s'" cmd1)      (tramp-message 9 "Sending rlogin command `%s'" cmd1)
# Line 3992  You can use percent escapes in the COMMA Line 4093  You can use percent escapes in the COMMA
4093  user name, and `%n' is replaced with the value of  user name, and `%n' is replaced with the value of
4094  `tramp-rsh-end-of-line'.  Use `%%' if you want a literal percent  `tramp-rsh-end-of-line'.  Use `%%' if you want a literal percent
4095  character."  character."
4096    (let ((cmd (format-spec command (list (cons ?u (or user (user-login-name)))    (let ((cmd (format-spec command `((?u ,(or user (user-login-name)))
4097                                          (cons ?n tramp-rsh-end-of-line))))                                      (?n ,tramp-rsh-end-of-line))))
4098          (cmd1 (format-spec command (list (cons ?u (or user (user-login-name)))          (cmd1 (format-spec command `((?u ,(or user (user-login-name)))
4099                                           (cons ?n ""))))                                       (?n ""))))
4100          found)          found)
4101      (erase-buffer)      (erase-buffer)
4102      (tramp-message 9 "Sending su command `%s'" cmd1)      (tramp-message 9 "Sending su command `%s'" cmd1)
# Line 4826  remote path name." Line 4927  remote path name."
4927        (tramp-make-tramp-multi-file-name multi-method method user host path)        (tramp-make-tramp-multi-file-name multi-method method user host path)
4928      (if user      (if user
4929          (format-spec tramp-make-tramp-file-format          (format-spec tramp-make-tramp-file-format
4930                       (list (cons ?m method)                       `((?m ,method) (?u ,user) (?h ,host) (?p ,path)))
                            (cons ?u user)  
                            (cons ?h host)  
                            (cons ?p path)))  
4931        (format-spec tramp-make-tramp-file-user-nil-format        (format-spec tramp-make-tramp-file-user-nil-format
4932                     (list (cons ?m method)                     `((?m ,method) (?h ,host) (?p ,path))))))
                          (cons ?h host)  
                          (cons ?p path))))))  
4933    
4934  ;; CCC: Henrik Holm: Not Changed.  Multi Method.  What should be done  ;; CCC: Henrik Holm: Not Changed.  Multi Method.  What should be done
4935  ;; with this when USER is nil?  ;; with this when USER is nil?
# Line 4844  remote path name." Line 4940  remote path name."
4940    (let* ((prefix-format (nth 0 tramp-make-multi-tramp-file-format))    (let* ((prefix-format (nth 0 tramp-make-multi-tramp-file-format))
4941           (hop-format    (nth 1 tramp-make-multi-tramp-file-format))           (hop-format    (nth 1 tramp-make-multi-tramp-file-format))
4942           (path-format   (nth 2 tramp-make-multi-tramp-file-format))           (path-format   (nth 2 tramp-make-multi-tramp-file-format))
4943           (prefix (format-spec prefix-format (list (cons ?m multi-method))))           (prefix (format-spec prefix-format `((?m ,multi-method))))
4944           (hops "")           (hops "")
4945           (path (format-spec path-format (list (cons ?p path))))           (path (format-spec path-format `((?p ,path))))
4946           (i 0)           (i 0)
4947           (len (length method)))           (len (length method)))
4948      (while (< i len)      (while (< i len)
4949        (let ((m (aref method i))        (let ((m (aref method i)) (u (aref user i)) (h (aref host i)))
4950              (u (aref user i))          (setq hops (concat hops (format-spec hop-format
4951              (h (aref host i)))                                               `((?m ,m) (?u ,u) (?h ,h)))))
         (setq hops (concat hops  
                            (format-spec  
                             hop-format  
                             (list (cons ?m m)  
                                   (cons ?u u)  
                                   (cons ?h h)))))  
4952          (incf i)))          (incf i)))
4953      (concat prefix hops path)))      (concat prefix hops path)))
4954    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26