Commit 36a3859f authored by Michael Albinus's avatar Michael Albinus
Browse files

* net/tramp-smb.el (top): Use `tramp-prefix-domain-regexp'.

(tramp-smb-maybe-open-connection): Use `tramp-file-name-*'
methods.
parent b96e6899
2009-01-03 Michael Albinus <michael.albinus@gmx.de>
* net/dbus.el (dbus-string-to-byte-array): Handle empty string.
* net/tramp.el (tramp-local-host-regexp)
(tramp-prefix-domain-format)
(tramp-prefix-domain-regexp, tramp-domain-regexp)
(tramp-user-with-domain-regexp, tramp-prefix-ipv6-format)
(tramp-prefix-ipv6-regexp, tramp-ipv6-regexp)
(tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp): New
defconst.
(tramp-file-name-structure, tramp-file-name-regexp-unified)
(tramp-completion-dissect-file-name, tramp-parse-hosts-group)
(tramp-dissect-file-name, tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name): Handle IPv6 addresses.
(tramp-handle-insert-file-contents): Fix setting of
`buffer-read-only'.
(tramp-compute-multi-hops, tramp-local-host-p): Use
`tramp-local-host-regexp'.
(tramp-file-name-real-user, tramp-file-name-domain): Use
`tramp-user-with-domain-regexp'.
* net/tramp-smb.el (top): Use `tramp-prefix-domain-regexp'.
(tramp-smb-maybe-open-connection): Use `tramp-file-name-*'
methods.
2009-01-03 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
* proced.el (proced-grammar-alist): Refiner can be a
......
;;; 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 <michael.albinus@gmx.de>
;; 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.
......@@ -905,20 +905,13 @@ connection if a previous connection has died for some reason."
(executable-find tramp-smb-program))
(error "Cannot find command %s in %s" tramp-smb-program exec-path))
(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)))
(let* ((user (tramp-file-name-user vec))
(host (tramp-file-name-host vec))
(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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment