diff options
| author | Stefan Monnier | 2013-09-03 16:14:58 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-09-03 16:14:58 -0400 |
| commit | 38726039b77db432989fed106c88e9f1aa463281 (patch) | |
| tree | f9e3221df8d4db9230cb06364807b4b560b237b6 | |
| parent | fde38d49782ef4b0e8f9b01d2e35b1856ef5c325 (diff) | |
| download | emacs-38726039b77db432989fed106c88e9f1aa463281.tar.gz emacs-38726039b77db432989fed106c88e9f1aa463281.zip | |
* lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
* lisp/net/tramp-smb.el (tramp-smb-get-file-entries):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory)
(tramp-compute-multi-hops): Fix misuses of `add-to-list'.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 77 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 12 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 4 |
4 files changed, 46 insertions, 52 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 468f7c7d70d..a9d62d17b21 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2013-09-03 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-09-03 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices): | ||
| 4 | * net/tramp-smb.el (tramp-smb-get-file-entries): | ||
| 5 | * net/tramp-sh.el (tramp-sh-handle-insert-directory) | ||
| 6 | (tramp-compute-multi-hops): Fix misuses of `add-to-list'. | ||
| 7 | |||
| 3 | * net/eww.el (eww-display-raw): Remove unused argument `charset'. | 8 | * net/eww.el (eww-display-raw): Remove unused argument `charset'. |
| 4 | Update call to it. | 9 | Update call to it. |
| 5 | (eww-change-select): Remove unused var `properties'. | 10 | (eww-change-select): Remove unused var `properties'. |
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 9ae352eccc1..e70400af820 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -1417,47 +1417,36 @@ It was \"a(say)\", but has changed to \"a{sv})\"." | |||
| 1417 | (port (tramp-file-name-port vec)) | 1417 | (port (tramp-file-name-port vec)) |
| 1418 | (localname (tramp-file-name-localname vec)) | 1418 | (localname (tramp-file-name-localname vec)) |
| 1419 | (ssl (if (string-match "^davs" method) "true" "false")) | 1419 | (ssl (if (string-match "^davs" method) "true" "false")) |
| 1420 | (mount-spec '(:array)) | 1420 | (mount-spec |
| 1421 | (mount-pref "/")) | 1421 | `(:array |
| 1422 | 1422 | ,@(cond | |
| 1423 | (setq | 1423 | ((string-equal "smb" method) |
| 1424 | mount-spec | 1424 | (string-match "^/?\\([^/]+\\)" localname) |
| 1425 | (append | 1425 | (list (tramp-gvfs-mount-spec-entry "type" "smb-share") |
| 1426 | mount-spec | 1426 | (tramp-gvfs-mount-spec-entry "server" host) |
| 1427 | (cond | 1427 | (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname)))) |
| 1428 | ((string-equal "smb" method) | 1428 | ((string-equal "obex" method) |
| 1429 | (string-match "^/?\\([^/]+\\)" localname) | 1429 | (list (tramp-gvfs-mount-spec-entry "type" method) |
| 1430 | (list (tramp-gvfs-mount-spec-entry "type" "smb-share") | 1430 | (tramp-gvfs-mount-spec-entry |
| 1431 | (tramp-gvfs-mount-spec-entry "server" host) | 1431 | "host" (concat "[" (tramp-bluez-address host) "]")))) |
| 1432 | (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname)))) | 1432 | ((string-match "\\`dav" method) |
| 1433 | ((string-equal "obex" method) | 1433 | (list (tramp-gvfs-mount-spec-entry "type" "dav") |
| 1434 | (list (tramp-gvfs-mount-spec-entry "type" method) | 1434 | (tramp-gvfs-mount-spec-entry "host" host) |
| 1435 | (tramp-gvfs-mount-spec-entry | 1435 | (tramp-gvfs-mount-spec-entry "ssl" ssl))) |
| 1436 | "host" (concat "[" (tramp-bluez-address host) "]")))) | 1436 | (t |
| 1437 | ((string-match "^dav" method) | 1437 | (list (tramp-gvfs-mount-spec-entry "type" method) |
| 1438 | (list (tramp-gvfs-mount-spec-entry "type" "dav") | 1438 | (tramp-gvfs-mount-spec-entry "host" host)))) |
| 1439 | (tramp-gvfs-mount-spec-entry "host" host) | 1439 | ,@(when user |
| 1440 | (tramp-gvfs-mount-spec-entry "ssl" ssl))) | 1440 | (list (tramp-gvfs-mount-spec-entry "user" user))) |
| 1441 | (t | 1441 | ,@(when domain |
| 1442 | (list (tramp-gvfs-mount-spec-entry "type" method) | 1442 | (list (tramp-gvfs-mount-spec-entry "domain" domain))) |
| 1443 | (tramp-gvfs-mount-spec-entry "host" host)))))) | 1443 | ,@(when port |
| 1444 | 1444 | (list (tramp-gvfs-mount-spec-entry "port" (number-to-string port)))))) | |
| 1445 | (when user | 1445 | (mount-pref |
| 1446 | (add-to-list | 1446 | (if (and (string-match "\\`dav" method) |
| 1447 | 'mount-spec (tramp-gvfs-mount-spec-entry "user" user) 'append)) | 1447 | (string-match "^/?[^/]+" localname)) |
| 1448 | 1448 | (match-string 0 localname) | |
| 1449 | (when domain | 1449 | "/"))) |
| 1450 | (add-to-list | ||
| 1451 | 'mount-spec (tramp-gvfs-mount-spec-entry "domain" domain) 'append)) | ||
| 1452 | |||
| 1453 | (when port | ||
| 1454 | (add-to-list | ||
| 1455 | 'mount-spec (tramp-gvfs-mount-spec-entry "port" (number-to-string port)) | ||
| 1456 | 'append)) | ||
| 1457 | |||
| 1458 | (when (and (string-match "^dav" method) | ||
| 1459 | (string-match "^/?[^/]+" localname)) | ||
| 1460 | (setq mount-pref (match-string 0 localname))) | ||
| 1461 | 1450 | ||
| 1462 | ;; Return. | 1451 | ;; Return. |
| 1463 | `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec))) | 1452 | `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec))) |
| @@ -1718,11 +1707,11 @@ They are retrieved from the hal daemon." | |||
| 1718 | (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1707 | (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1719 | :system tramp-hal-service device tramp-hal-interface-device | 1708 | :system tramp-hal-service device tramp-hal-interface-device |
| 1720 | "PropertyExists" "sync.plugin") | 1709 | "PropertyExists" "sync.plugin") |
| 1721 | (add-to-list | 1710 | (pushnew |
| 1722 | 'tramp-synce-devices | ||
| 1723 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1711 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1724 | :system tramp-hal-service device tramp-hal-interface-device | 1712 | :system tramp-hal-service device tramp-hal-interface-device |
| 1725 | "GetPropertyString" "pda.pocketpc.name")))) | 1713 | "GetPropertyString" "pda.pocketpc.name") |
| 1714 | tramp-synce-devices :test #'equal))) | ||
| 1726 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) | 1715 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) |
| 1727 | tramp-synce-devices)) | 1716 | tramp-synce-devices)) |
| 1728 | 1717 | ||
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ac131765189..8ca94122af1 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2500,8 +2500,8 @@ This is like `dired-recursive-delete-directory' for Tramp files." | |||
| 2500 | 'file-name-nondirectory (list localname))) | 2500 | 'file-name-nondirectory (list localname))) |
| 2501 | (setq localname (tramp-run-real-handler | 2501 | (setq localname (tramp-run-real-handler |
| 2502 | 'file-name-directory (list localname)))) | 2502 | 'file-name-directory (list localname)))) |
| 2503 | (unless full-directory-p | 2503 | (unless (or full-directory-p (member "-d" switches)) |
| 2504 | (setq switches (add-to-list 'switches "-d" 'append))) | 2504 | (setq switches (append switches '("-d")))) |
| 2505 | (setq switches (mapconcat 'tramp-shell-quote-argument switches " ")) | 2505 | (setq switches (mapconcat 'tramp-shell-quote-argument switches " ")) |
| 2506 | (when wildcard | 2506 | (when wildcard |
| 2507 | (setq switches (concat switches " " wildcard))) | 2507 | (setq switches (concat switches " " wildcard))) |
| @@ -4252,7 +4252,7 @@ Gateway hops are already opened." | |||
| 4252 | ?h (or (tramp-file-name-host (car target-alist)) "")))) | 4252 | ?h (or (tramp-file-name-host (car target-alist)) "")))) |
| 4253 | (with-parsed-tramp-file-name proxy l | 4253 | (with-parsed-tramp-file-name proxy l |
| 4254 | ;; Add the hop. | 4254 | ;; Add the hop. |
| 4255 | (add-to-list 'target-alist l) | 4255 | (pushnew l target-alist :test #'equal) |
| 4256 | ;; Start next search. | 4256 | ;; Start next search. |
| 4257 | (setq choices tramp-default-proxies-alist))))) | 4257 | (setq choices tramp-default-proxies-alist))))) |
| 4258 | 4258 | ||
| @@ -4270,11 +4270,11 @@ Gateway hops are already opened." | |||
| 4270 | vec 'file-error | 4270 | vec 'file-error |
| 4271 | "Connection `%s' is not supported for gateway access." hop)) | 4271 | "Connection `%s' is not supported for gateway access." hop)) |
| 4272 | ;; Open the gateway connection. | 4272 | ;; Open the gateway connection. |
| 4273 | (add-to-list | 4273 | (pushnew |
| 4274 | 'target-alist | ||
| 4275 | (vector | 4274 | (vector |
| 4276 | (tramp-file-name-method hop) (tramp-file-name-user hop) | 4275 | (tramp-file-name-method hop) (tramp-file-name-user hop) |
| 4277 | (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)) | 4276 | (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil) |
| 4277 | target-alist :test #'equal) | ||
| 4278 | ;; For the password prompt, we need the correct values. | 4278 | ;; For the password prompt, we need the correct values. |
| 4279 | ;; Therefore, we must remember the gateway vector. But we | 4279 | ;; Therefore, we must remember the gateway vector. But we |
| 4280 | ;; cannot do it as connection property, because it shouldn't | 4280 | ;; cannot do it as connection property, because it shouldn't |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 569bfb9c874..f05a54f46f7 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -1364,14 +1364,14 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)." | |||
| 1364 | (while (not (eobp)) | 1364 | (while (not (eobp)) |
| 1365 | (setq entry (tramp-smb-read-file-entry share)) | 1365 | (setq entry (tramp-smb-read-file-entry share)) |
| 1366 | (forward-line) | 1366 | (forward-line) |
| 1367 | (when entry (add-to-list 'res entry)))) | 1367 | (when entry (pushnew entry res :test #'equal)))) |
| 1368 | 1368 | ||
| 1369 | ;; Cache share entries. | 1369 | ;; Cache share entries. |
| 1370 | (unless share | 1370 | (unless share |
| 1371 | (tramp-set-connection-property v "share-cache" res))) | 1371 | (tramp-set-connection-property v "share-cache" res))) |
| 1372 | 1372 | ||
| 1373 | ;; Add directory itself. | 1373 | ;; Add directory itself. |
| 1374 | (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0))) | 1374 | (pushnew '("" "drwxrwxrwx" 0 (0 0)) res :test #'equal) |
| 1375 | 1375 | ||
| 1376 | ;; There's a very strange error (debugged with XEmacs 21.4.14) | 1376 | ;; There's a very strange error (debugged with XEmacs 21.4.14) |
| 1377 | ;; If there's no short delay, it returns nil. No idea about. | 1377 | ;; If there's no short delay, it returns nil. No idea about. |