aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus2009-01-03 15:00:35 +0000
committerMichael Albinus2009-01-03 15:00:35 +0000
commit36a3859f9bf18c11e5a970b236efd626bba8d4b8 (patch)
tree258b76d7e861cc23bed7274fae150aff44580576 /lisp/net
parentb96e689991dc192612fbe3bcccaa641aae7c1f92 (diff)
downloademacs-36a3859f9bf18c11e5a970b236efd626bba8d4b8.tar.gz
emacs-36a3859f9bf18c11e5a970b236efd626bba8d4b8.zip
* net/tramp-smb.el (top): Use `tramp-prefix-domain-regexp'.
(tramp-smb-maybe-open-connection): Use `tramp-file-name-*' methods.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp-smb.el27
1 files changed, 10 insertions, 17 deletions
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index af6cf93dd1e..4ce8aa7fce6 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1,7 +1,7 @@
1;;; tramp-smb.el --- Tramp access functions for SMB servers 1;;; tramp-smb.el --- Tramp access functions for SMB servers
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4;; 2008 Free Software Foundation, Inc. 4;; 2009 Free Software Foundation, Inc.
5 5
6;; Author: Michael Albinus <michael.albinus@gmx.de> 6;; Author: Michael Albinus <michael.albinus@gmx.de>
7;; Keywords: comm, processes 7;; Keywords: comm, processes
@@ -44,7 +44,7 @@
44;; Add a default for `tramp-default-method-alist'. Rule: If there is 44;; Add a default for `tramp-default-method-alist'. Rule: If there is
45;; a domain in USER, it must be the SMB method. 45;; a domain in USER, it must be the SMB method.
46(add-to-list 'tramp-default-method-alist 46(add-to-list 'tramp-default-method-alist
47 `(nil "%" ,tramp-smb-method)) 47 `(nil ,tramp-prefix-domain-regexp ,tramp-smb-method))
48 48
49;; Add a default for `tramp-default-user-alist'. Rule: For the SMB method, 49;; Add a default for `tramp-default-user-alist'. Rule: For the SMB method,
50;; the anonymous user is chosen. 50;; the anonymous user is chosen.
@@ -905,20 +905,13 @@ connection if a previous connection has died for some reason."
905 (executable-find tramp-smb-program)) 905 (executable-find tramp-smb-program))
906 (error "Cannot find command %s in %s" tramp-smb-program exec-path)) 906 (error "Cannot find command %s in %s" tramp-smb-program exec-path))
907 907
908 (let* ((user (tramp-file-name-user vec)) 908 (let* ((user (tramp-file-name-user vec))
909 (host (tramp-file-name-host vec)) 909 (host (tramp-file-name-host vec))
910 (real-user user) 910 (real-user (tramp-file-name-real-user vec))
911 (real-host host) 911 (real-host (tramp-file-name-real-host vec))
912 domain port args) 912 (domain (tramp-file-name-domain vec))
913 913 (port (tramp-file-name-port vec))
914 ;; Check for domain ("user%domain") and port ("host#port"). 914 args)
915 (when (and user (string-match "\\(.+\\)%\\(.+\\)" user))
916 (setq real-user (or (match-string 1 user) user)
917 domain (match-string 2 user)))
918
919 (when (and host (string-match "\\(.+\\)#\\(.+\\)" host))
920 (setq real-host (or (match-string 1 host) host)
921 port (match-string 2 host)))
922 915
923 (if share 916 (if share
924 (setq args (list (concat "//" real-host "/" share))) 917 (setq args (list (concat "//" real-host "/" share)))