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

Diff of /tramp/lisp/tramp.el

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

revision 2.261 by albinus, Sat Dec 21 21:32:59 2002 UTC revision 2.262 by albinus, Sun Dec 22 22:28:30 2002 UTC
# Line 106  Line 106 
106  (unless (featurep 'xemacs)  (unless (featurep 'xemacs)
107    (eval-after-load "tramp"    (eval-after-load "tramp"
108      '(require 'tramp-ftp)))      '(require 'tramp-ftp)))
109  ;; tramp-smb uses "smbclient" from Samba.  Not available under Windows.  
110  ;; And even not necessary there, because Emacs supports UNC file names  ;; tramp-smb uses "smbclient" from Samba.
111  ;; like "//host/share/path".  ;; Not available under Cygwin and Windows, because they don't offer
112  (unless (memq system-type '(windows-nt))  ;; "smbclient".  And even not necessary there, because Emacs supports
113    ;; UNC file names like "//host/share/path".
114    (unless (memq system-type '(cygwin windows-nt))
115    (eval-after-load "tramp"    (eval-after-load "tramp"
116      '(require 'tramp-smb)))      '(require 'tramp-smb)))
117    
# Line 3648  necessary anymore." Line 3650  necessary anymore."
3650  They are collected by `tramp-completion-dissect-file-name1'."  They are collected by `tramp-completion-dissect-file-name1'."
3651    
3652    (let* ((result)    (let* ((result)
3653           (x-nil "\\|\\(\\)"))           (x-nil "\\|\\(\\)")
3654             ;; "/method" "/[method"
3655             (tramp-completion-file-name-structure1
3656              (list (concat tramp-prefix-regexp "\\(" tramp-method-regexp x-nil "\\)$")
3657                    1 nil nil nil))
3658             ;; "/user" "/[user"
3659             (tramp-completion-file-name-structure2
3660              (list (concat tramp-prefix-regexp "\\(" tramp-user-regexp x-nil   "\\)$")
3661                    nil 1 nil nil))
3662             ;; "/host" "/[host"
3663             (tramp-completion-file-name-structure3
3664              (list (concat tramp-prefix-regexp "\\(" tramp-host-regexp x-nil   "\\)$")
3665                    nil nil 1 nil))
3666             ;; "/user@host" "/[user@host"
3667             (tramp-completion-file-name-structure4
3668              (list (concat tramp-prefix-regexp
3669                            "\\(" tramp-user-regexp "\\)"   tramp-postfix-user-regexp
3670                            "\\(" tramp-host-regexp x-nil   "\\)$")
3671                    nil 1 2 nil))
3672             ;; "/method:user" "/[method/user"
3673             (tramp-completion-file-name-structure5
3674              (list (concat tramp-prefix-regexp
3675                            "\\(" tramp-method-regexp "\\)" tramp-postfix-single-method-regexp
3676                            "\\(" tramp-user-regexp x-nil   "\\)$")
3677                    1 2 nil nil))
3678             ;; "/method:host" "/[method/host"
3679             (tramp-completion-file-name-structure6
3680              (list (concat tramp-prefix-regexp
3681                            "\\(" tramp-method-regexp "\\)" tramp-postfix-single-method-regexp
3682                            "\\(" tramp-host-regexp x-nil   "\\)$")
3683                    1 nil 2 nil))
3684             ;; "/method:user@host" "/[method/user@host"
3685             (tramp-completion-file-name-structure7
3686              (list (concat tramp-prefix-regexp
3687                            "\\(" tramp-method-regexp "\\)" tramp-postfix-single-method-regexp
3688                            "\\(" tramp-user-regexp "\\)"   tramp-postfix-user-regexp
3689                            "\\(" tramp-host-regexp x-nil   "\\)$")
3690                    1 2 3 nil)))
3691    
     ;; "/method" "/[method"  
     (defconst tramp-completion-file-name-structure1  
       (list (concat tramp-prefix-regexp "\\(" tramp-method-regexp x-nil "\\)$")  
             1 9 9 9))  
     ;; "/user" "/[user"  
     (defconst tramp-completion-file-name-structure2  
       (list (concat tramp-prefix-regexp "\\(" tramp-user-regexp x-nil   "\\)$")  
             9 1 9 9))  
     ;; "/host" "/[host"  
     (defconst tramp-completion-file-name-structure3  
       (list (concat tramp-prefix-regexp "\\(" tramp-host-regexp x-nil   "\\)$")  
             9 9 1 9))  
     ;; "/user@host" "/[user@host"  
     (defconst tramp-completion-file-name-structure4  
       (list (concat tramp-prefix-regexp  
                     "\\(" tramp-user-regexp "\\)"   tramp-postfix-user-regexp  
                     "\\(" tramp-host-regexp x-nil   "\\)$")  
             9 1 2 9))  
     ;; "/method:user" "/[method/user"  
     (defconst tramp-completion-file-name-structure5  
       (list (concat tramp-prefix-regexp  
                     "\\(" tramp-method-regexp "\\)" tramp-postfix-single-method-regexp  
                     "\\(" tramp-user-regexp x-nil   "\\)$")  
             1 2 9 9))  
     ;; "/method:host" "/[method/host"  
     (defconst tramp-completion-file-name-structure6  
       (list (concat tramp-prefix-regexp  
                     "\\(" tramp-method-regexp "\\)" tramp-postfix-single-method-regexp  
                     "\\(" tramp-host-regexp x-nil   "\\)$")  
             1 9 2 9))  
     ;; "/method:user@host" "/[method/user@host"  
     (defconst tramp-completion-file-name-structure7  
       (list (concat tramp-prefix-regexp  
                     "\\(" tramp-method-regexp "\\)" tramp-postfix-single-method-regexp  
                     "\\(" tramp-user-regexp "\\)"   tramp-postfix-user-regexp  
                     "\\(" tramp-host-regexp x-nil   "\\)$")  
             1 2 3 9))  
     
3692      (mapcar (lambda (regexp)      (mapcar (lambda (regexp)
3693        (add-to-list 'result        (add-to-list 'result
3694          (tramp-completion-dissect-file-name1 regexp name)))          (tramp-completion-dissect-file-name1 regexp name)))
# Line 3711  remote host and remote path name." Line 3712  remote host and remote path name."
3712    (let (method)    (let (method)
3713      (save-match-data      (save-match-data
3714        (when (string-match (nth 0 structure) name)        (when (string-match (nth 0 structure) name)
3715          (setq method (match-string (nth 1 structure) name))          (setq method (and (nth 1 structure)
3716                              (match-string (nth 1 structure) name)))
3717          (if (and method (member method tramp-multi-methods))          (if (and method (member method tramp-multi-methods))
3718              ;; Not handled (yet).              ;; Not handled (yet).
3719              (make-tramp-file-name              (make-tramp-file-name
# Line 3720  remote host and remote path name." Line 3722  remote host and remote path name."
3722               :user nil               :user nil
3723               :host nil               :host nil
3724               :path nil)               :path nil)
3725            (let ((user   (match-string (nth 2 structure) name))            (let ((user   (and (nth 2 structure)
3726                  (host   (match-string (nth 3 structure) name))                               (match-string (nth 2 structure) name)))
3727                  (path   (match-string (nth 4 structure) name)))                  (host   (and (nth 3 structure)
3728                                 (match-string (nth 3 structure) name)))
3729                    (path   (and (nth 4 structure)
3730                                 (match-string (nth 4 structure) name))))
3731              (make-tramp-file-name              (make-tramp-file-name
3732               :multi-method nil               :multi-method nil
3733               :method method               :method method

Legend:
Removed from v.2.261  
changed lines
  Added in v.2.262

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