emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/net tramp-smb.el


From: Michael Albinus
Subject: [Emacs-diffs] emacs/lisp/net tramp-smb.el
Date: Sat, 03 Jan 2009 14:59:13 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       09/01/03 14:59:13

Modified files:
        lisp/net       : tramp-smb.el 

Log message:
        * net/tramp-smb.el (top): Use `tramp-prefix-domain-regexp'.
        (tramp-smb-maybe-open-connection): Use `tramp-file-name-*'
        methods.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp-smb.el?cvsroot=emacs&r1=1.44&r2=1.45

Patches:
Index: tramp-smb.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp-smb.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- tramp-smb.el        16 Nov 2008 14:15:59 -0000      1.44
+++ tramp-smb.el        3 Jan 2009 14:59:12 -0000       1.45
@@ -1,7 +1,7 @@
 ;;; tramp-smb.el --- Tramp access functions for SMB servers
 
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;;   2009 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <address@hidden>
 ;; Keywords: comm, processes
@@ -44,7 +44,7 @@
 ;; Add a default for `tramp-default-method-alist'. Rule: If there is
 ;; a domain in USER, it must be the SMB method.
 (add-to-list 'tramp-default-method-alist
-            `(nil "%" ,tramp-smb-method))
+            `(nil ,tramp-prefix-domain-regexp ,tramp-smb-method))
 
 ;; Add a default for `tramp-default-user-alist'. Rule: For the SMB method,
 ;; the anonymous user is chosen.
@@ -907,18 +907,11 @@
 
        (let* ((user (tramp-file-name-user vec))
               (host (tramp-file-name-host vec))
-              (real-user user)
-              (real-host host)
-              domain port args)
-
-         ;; Check for domain ("user%domain") and port ("host#port").
-         (when (and user (string-match "\\(.+\\)%\\(.+\\)" user))
-           (setq real-user (or (match-string 1 user) user)
-                 domain (match-string 2 user)))
-
-         (when (and host (string-match "\\(.+\\)#\\(.+\\)" host))
-           (setq real-host (or (match-string 1 host) host)
-                 port (match-string 2 host)))
+              (real-user (tramp-file-name-real-user vec))
+              (real-host (tramp-file-name-real-host vec))
+              (domain    (tramp-file-name-domain vec))
+              (port      (tramp-file-name-port vec))
+              args)
 
          (if share
              (setq args (list (concat "//" real-host "/" share)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]