[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114257: * net/tramp.el (tramp-check-proper-method-a
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] trunk r114257: * net/tramp.el (tramp-check-proper-method-and-host): Rename it from |
Date: |
Fri, 13 Sep 2013 06:03:13 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114257
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2013-09-13 08:03:06 +0200
message:
* net/tramp.el (tramp-check-proper-method-and-host): Rename it from
`tramp-check-proper-host'. Check for a valid method name.
* net/tramp-adb.el (tramp-adb-maybe-open-connection):
* net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* net/tramp-sh.el (tramp-maybe-open-connection):
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Call it.
* net/tramp-cache.el (tramp-cache-print): Don't print text properties
also for hash values.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/tramp-adb.el trampadb.el-20121204164216-03wyr5miam215d7f-1
lisp/net/tramp-cache.el
trampcache.el-20091113204419-o5vbwnq5f7feedwu-5065
lisp/net/tramp-gvfs.el
trampgvfs.el-20091113204419-o5vbwnq5f7feedwu-10898
lisp/net/tramp-sh.el trampsh.el-20100913133439-a1faifh29eqoi4nh-1
lisp/net/tramp-smb.el
trampsmb.el-20091113204419-o5vbwnq5f7feedwu-2515
lisp/net/tramp.el tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-12 20:21:41 +0000
+++ b/lisp/ChangeLog 2013-09-13 06:03:06 +0000
@@ -1,3 +1,16 @@
+2013-09-13 Michael Albinus <address@hidden>
+
+ * net/tramp.el (tramp-check-proper-method-and-host): Rename it from
+ `tramp-check-proper-host'. Check for a valid method name.
+
+ * net/tramp-adb.el (tramp-adb-maybe-open-connection):
+ * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
+ * net/tramp-sh.el (tramp-maybe-open-connection):
+ * net/tramp-smb.el (tramp-smb-maybe-open-connection): Call it.
+
+ * net/tramp-cache.el (tramp-cache-print): Don't print text properties
+ also for hash values.
+
2013-09-12 Stefan Monnier <address@hidden>
* term/ns-win.el (parameters): Don't declare as dynamic.
=== modified file 'lisp/net/tramp-adb.el'
--- a/lisp/net/tramp-adb.el 2013-09-10 07:45:33 +0000
+++ b/lisp/net/tramp-adb.el 2013-09-13 06:03:06 +0000
@@ -1092,7 +1092,7 @@
"Maybe open a connection VEC.
Does not do anything if a connection is already open, but re-opens the
connection if a previous connection has died for some reason."
- (tramp-check-proper-host vec)
+ (tramp-check-proper-method-and-host vec)
(let* ((buf (tramp-get-connection-buffer vec))
(p (get-buffer-process buf))
=== modified file 'lisp/net/tramp-cache.el'
--- a/lisp/net/tramp-cache.el 2013-09-08 15:04:10 +0000
+++ b/lisp/net/tramp-cache.el 2013-09-13 06:03:06 +0000
@@ -285,16 +285,18 @@
(let (result)
(maphash
(lambda (key value)
- ;; Remove text properties from KEY.
- (when (vectorp key)
- (dotimes (i (length key))
- (when (stringp (aref key i))
- (aset key i
- (funcall
- ;; `substring-no-properties' does not exist in XEmacs.
- (if (functionp 'substring-no-properties)
- 'substring-no-properties 'identity)
- (aref key i))))))
+ ;; Remove text properties from KEY and VALUE.
+ ;; `substring-no-properties' does not exist in XEmacs.
+ (when (functionp 'substring-no-properties)
+ (when (vectorp key)
+ (dotimes (i (length key))
+ (when (stringp (aref key i))
+ (aset key i (funcall 'substring-no-properties (aref key i))))))
+ (when (stringp key)
+ (setq key (funcall 'substring-no-properties key)))
+ (when (stringp value)
+ (setq value (funcall 'substring-no-properties value))))
+ ;; Dump.
(let ((tmp (format
"(%s %s)"
(if (processp key)
=== modified file 'lisp/net/tramp-gvfs.el'
--- a/lisp/net/tramp-gvfs.el 2013-09-08 15:04:10 +0000
+++ b/lisp/net/tramp-gvfs.el 2013-09-13 06:03:06 +0000
@@ -1465,7 +1465,7 @@
"Maybe open a connection VEC.
Does not do anything if a connection is already open, but re-opens the
connection if a previous connection has died for some reason."
- (tramp-check-proper-host vec)
+ (tramp-check-proper-method-and-host vec)
;; We set the file name, in case there are incoming D-Bus signals or
;; D-Bus errors.
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2013-09-10 07:45:33 +0000
+++ b/lisp/net/tramp-sh.el 2013-09-13 06:03:06 +0000
@@ -4286,7 +4286,7 @@
"Maybe open a connection VEC.
Does not do anything if a connection is already open, but re-opens the
connection if a previous connection has died for some reason."
- (tramp-check-proper-host vec)
+ (tramp-check-proper-method-and-host vec)
(let ((p (tramp-get-connection-process vec))
(process-name (tramp-get-connection-property vec "process-name" nil))
=== modified file 'lisp/net/tramp-smb.el'
--- a/lisp/net/tramp-smb.el 2013-09-10 07:45:33 +0000
+++ b/lisp/net/tramp-smb.el 2013-09-13 06:03:06 +0000
@@ -1566,7 +1566,7 @@
connection if a previous connection has died for some reason.
If ARGUMENT is non-nil, use it as argument for
`tramp-smb-winexe-program', and suppress any checks."
- (tramp-check-proper-host vec)
+ (tramp-check-proper-method-and-host vec)
(let* ((share (tramp-smb-get-share vec))
(buf (tramp-get-connection-buffer vec))
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-09-10 07:45:33 +0000
+++ b/lisp/net/tramp.el 2013-09-13 06:03:06 +0000
@@ -1265,15 +1265,19 @@
lhost)
tramp-default-host))
-(defun tramp-check-proper-host (vec)
- "Check host name of VEC."
+(defun tramp-check-proper-method-and-host (vec)
+ "Check method and host name of VEC."
(let ((method (tramp-file-name-method vec))
(user (tramp-file-name-user vec))
- (host (tramp-file-name-host vec)))
+ (host (tramp-file-name-host vec))
+ (methods (mapcar 'car tramp-methods)))
+ (when (and method (not (member method methods)))
+ (tramp-cleanup-connection vec)
+ (tramp-user-error vec "Unknown method \"%s\"" method))
(when (and (equal tramp-syntax 'ftp) host
(or (null method) (get-text-property 0 'tramp-default method))
(or (null user) (get-text-property 0 'tramp-default user))
- (member host (mapcar 'car tramp-methods)))
+ (member host methods))
(tramp-cleanup-connection vec)
(tramp-user-error vec "Host name must not match method \"%s\"" host))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114257: * net/tramp.el (tramp-check-proper-method-and-host): Rename it from,
Michael Albinus <=