diff options
| author | Joakim Verona | 2013-09-13 08:11:34 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-09-13 08:11:34 +0200 |
| commit | 584bb3a913701a6324d020c87a39e03828fa0bd1 (patch) | |
| tree | 9a474d375f7b784ad76afb1ea4a09b8ef176dda9 /lisp | |
| parent | 4f6e32297ee0536354c3261027f6c65586c646f0 (diff) | |
| parent | 35c3d36e0ed6c7f5104946dd966ca46d0495f640 (diff) | |
| download | emacs-584bb3a913701a6324d020c87a39e03828fa0bd1.tar.gz emacs-584bb3a913701a6324d020c87a39e03828fa0bd1.zip | |
merge from trunk
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/net/tramp-adb.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-cache.el | 22 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 12 |
7 files changed, 37 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7dea339d669..de9b8d91516 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2013-09-13 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-check-proper-method-and-host): Rename it from | ||
| 4 | `tramp-check-proper-host'. Check for a valid method name. | ||
| 5 | |||
| 6 | * net/tramp-adb.el (tramp-adb-maybe-open-connection): | ||
| 7 | * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): | ||
| 8 | * net/tramp-sh.el (tramp-maybe-open-connection): | ||
| 9 | * net/tramp-smb.el (tramp-smb-maybe-open-connection): Call it. | ||
| 10 | |||
| 11 | * net/tramp-cache.el (tramp-cache-print): Don't print text properties | ||
| 12 | also for hash values. | ||
| 13 | |||
| 1 | 2013-09-12 Stefan Monnier <monnier@iro.umontreal.ca> | 14 | 2013-09-12 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 15 | ||
| 3 | * term/ns-win.el (parameters): Don't declare as dynamic. | 16 | * term/ns-win.el (parameters): Don't declare as dynamic. |
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 595037ab943..132ffaa27a8 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -1092,7 +1092,7 @@ FMT and ARGS are passed to `error'." | |||
| 1092 | "Maybe open a connection VEC. | 1092 | "Maybe open a connection VEC. |
| 1093 | Does not do anything if a connection is already open, but re-opens the | 1093 | Does not do anything if a connection is already open, but re-opens the |
| 1094 | connection if a previous connection has died for some reason." | 1094 | connection if a previous connection has died for some reason." |
| 1095 | (tramp-check-proper-host vec) | 1095 | (tramp-check-proper-method-and-host vec) |
| 1096 | 1096 | ||
| 1097 | (let* ((buf (tramp-get-connection-buffer vec)) | 1097 | (let* ((buf (tramp-get-connection-buffer vec)) |
| 1098 | (p (get-buffer-process buf)) | 1098 | (p (get-buffer-process buf)) |
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index b4e5e4ffd0f..7407f83e92b 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -285,16 +285,18 @@ KEY identifies the connection, it is either a process or a vector." | |||
| 285 | (let (result) | 285 | (let (result) |
| 286 | (maphash | 286 | (maphash |
| 287 | (lambda (key value) | 287 | (lambda (key value) |
| 288 | ;; Remove text properties from KEY. | 288 | ;; Remove text properties from KEY and VALUE. |
| 289 | (when (vectorp key) | 289 | ;; `substring-no-properties' does not exist in XEmacs. |
| 290 | (dotimes (i (length key)) | 290 | (when (functionp 'substring-no-properties) |
| 291 | (when (stringp (aref key i)) | 291 | (when (vectorp key) |
| 292 | (aset key i | 292 | (dotimes (i (length key)) |
| 293 | (funcall | 293 | (when (stringp (aref key i)) |
| 294 | ;; `substring-no-properties' does not exist in XEmacs. | 294 | (aset key i (funcall 'substring-no-properties (aref key i)))))) |
| 295 | (if (functionp 'substring-no-properties) | 295 | (when (stringp key) |
| 296 | 'substring-no-properties 'identity) | 296 | (setq key (funcall 'substring-no-properties key))) |
| 297 | (aref key i)))))) | 297 | (when (stringp value) |
| 298 | (setq value (funcall 'substring-no-properties value)))) | ||
| 299 | ;; Dump. | ||
| 298 | (let ((tmp (format | 300 | (let ((tmp (format |
| 299 | "(%s %s)" | 301 | "(%s %s)" |
| 300 | (if (processp key) | 302 | (if (processp key) |
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index e764e4767dd..8f79e495420 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -1465,7 +1465,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"." | |||
| 1465 | "Maybe open a connection VEC. | 1465 | "Maybe open a connection VEC. |
| 1466 | Does not do anything if a connection is already open, but re-opens the | 1466 | Does not do anything if a connection is already open, but re-opens the |
| 1467 | connection if a previous connection has died for some reason." | 1467 | connection if a previous connection has died for some reason." |
| 1468 | (tramp-check-proper-host vec) | 1468 | (tramp-check-proper-method-and-host vec) |
| 1469 | 1469 | ||
| 1470 | ;; We set the file name, in case there are incoming D-Bus signals or | 1470 | ;; We set the file name, in case there are incoming D-Bus signals or |
| 1471 | ;; D-Bus errors. | 1471 | ;; D-Bus errors. |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index f91cbb29a1d..e37c34e0df9 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4286,7 +4286,7 @@ Gateway hops are already opened." | |||
| 4286 | "Maybe open a connection VEC. | 4286 | "Maybe open a connection VEC. |
| 4287 | Does not do anything if a connection is already open, but re-opens the | 4287 | Does not do anything if a connection is already open, but re-opens the |
| 4288 | connection if a previous connection has died for some reason." | 4288 | connection if a previous connection has died for some reason." |
| 4289 | (tramp-check-proper-host vec) | 4289 | (tramp-check-proper-method-and-host vec) |
| 4290 | 4290 | ||
| 4291 | (let ((p (tramp-get-connection-process vec)) | 4291 | (let ((p (tramp-get-connection-process vec)) |
| 4292 | (process-name (tramp-get-connection-property vec "process-name" nil)) | 4292 | (process-name (tramp-get-connection-property vec "process-name" nil)) |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 27f3bd41e9c..03ad62be0a5 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -1566,7 +1566,7 @@ Does not do anything if a connection is already open, but re-opens the | |||
| 1566 | connection if a previous connection has died for some reason. | 1566 | connection if a previous connection has died for some reason. |
| 1567 | If ARGUMENT is non-nil, use it as argument for | 1567 | If ARGUMENT is non-nil, use it as argument for |
| 1568 | `tramp-smb-winexe-program', and suppress any checks." | 1568 | `tramp-smb-winexe-program', and suppress any checks." |
| 1569 | (tramp-check-proper-host vec) | 1569 | (tramp-check-proper-method-and-host vec) |
| 1570 | 1570 | ||
| 1571 | (let* ((share (tramp-smb-get-share vec)) | 1571 | (let* ((share (tramp-smb-get-share vec)) |
| 1572 | (buf (tramp-get-connection-buffer vec)) | 1572 | (buf (tramp-get-connection-buffer vec)) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index fe4f7b8bb54..48420aad5a3 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1265,15 +1265,19 @@ This is HOST, if non-nil. Otherwise, it is `tramp-default-host'." | |||
| 1265 | lhost) | 1265 | lhost) |
| 1266 | tramp-default-host)) | 1266 | tramp-default-host)) |
| 1267 | 1267 | ||
| 1268 | (defun tramp-check-proper-host (vec) | 1268 | (defun tramp-check-proper-method-and-host (vec) |
| 1269 | "Check host name of VEC." | 1269 | "Check method and host name of VEC." |
| 1270 | (let ((method (tramp-file-name-method vec)) | 1270 | (let ((method (tramp-file-name-method vec)) |
| 1271 | (user (tramp-file-name-user vec)) | 1271 | (user (tramp-file-name-user vec)) |
| 1272 | (host (tramp-file-name-host vec))) | 1272 | (host (tramp-file-name-host vec)) |
| 1273 | (methods (mapcar 'car tramp-methods))) | ||
| 1274 | (when (and method (not (member method methods))) | ||
| 1275 | (tramp-cleanup-connection vec) | ||
| 1276 | (tramp-user-error vec "Unknown method \"%s\"" method)) | ||
| 1273 | (when (and (equal tramp-syntax 'ftp) host | 1277 | (when (and (equal tramp-syntax 'ftp) host |
| 1274 | (or (null method) (get-text-property 0 'tramp-default method)) | 1278 | (or (null method) (get-text-property 0 'tramp-default method)) |
| 1275 | (or (null user) (get-text-property 0 'tramp-default user)) | 1279 | (or (null user) (get-text-property 0 'tramp-default user)) |
| 1276 | (member host (mapcar 'car tramp-methods))) | 1280 | (member host methods)) |
| 1277 | (tramp-cleanup-connection vec) | 1281 | (tramp-cleanup-connection vec) |
| 1278 | (tramp-user-error vec "Host name must not match method \"%s\"" host)))) | 1282 | (tramp-user-error vec "Host name must not match method \"%s\"" host)))) |
| 1279 | 1283 | ||