[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114123: * lisp/net/tramp-gvfs.el (tramp-gvfs-mount-
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r114123: * lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices): |
Date: |
Tue, 03 Sep 2013 20:15:11 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114123
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2013-09-03 16:14:58 -0400
message:
* 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'.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
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
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-03 19:49:54 +0000
+++ b/lisp/ChangeLog 2013-09-03 20:14:58 +0000
@@ -1,5 +1,10 @@
2013-09-03 Stefan Monnier <address@hidden>
+ * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
+ * net/tramp-smb.el (tramp-smb-get-file-entries):
+ * net/tramp-sh.el (tramp-sh-handle-insert-directory)
+ (tramp-compute-multi-hops): Fix misuses of `add-to-list'.
+
* net/eww.el (eww-display-raw): Remove unused argument `charset'.
Update call to it.
(eww-change-select): Remove unused var `properties'.
=== modified file 'lisp/net/tramp-gvfs.el'
--- a/lisp/net/tramp-gvfs.el 2013-09-02 13:41:08 +0000
+++ b/lisp/net/tramp-gvfs.el 2013-09-03 20:14:58 +0000
@@ -1417,47 +1417,36 @@
(port (tramp-file-name-port vec))
(localname (tramp-file-name-localname vec))
(ssl (if (string-match "^davs" method) "true" "false"))
- (mount-spec '(:array))
- (mount-pref "/"))
-
- (setq
- mount-spec
- (append
- mount-spec
- (cond
- ((string-equal "smb" method)
- (string-match "^/?\\([^/]+\\)" localname)
- (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
- (tramp-gvfs-mount-spec-entry "server" host)
- (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname))))
- ((string-equal "obex" method)
- (list (tramp-gvfs-mount-spec-entry "type" method)
- (tramp-gvfs-mount-spec-entry
- "host" (concat "[" (tramp-bluez-address host) "]"))))
- ((string-match "^dav" method)
- (list (tramp-gvfs-mount-spec-entry "type" "dav")
- (tramp-gvfs-mount-spec-entry "host" host)
- (tramp-gvfs-mount-spec-entry "ssl" ssl)))
- (t
- (list (tramp-gvfs-mount-spec-entry "type" method)
- (tramp-gvfs-mount-spec-entry "host" host))))))
-
- (when user
- (add-to-list
- 'mount-spec (tramp-gvfs-mount-spec-entry "user" user) 'append))
-
- (when domain
- (add-to-list
- 'mount-spec (tramp-gvfs-mount-spec-entry "domain" domain) 'append))
-
- (when port
- (add-to-list
- 'mount-spec (tramp-gvfs-mount-spec-entry "port" (number-to-string port))
- 'append))
-
- (when (and (string-match "^dav" method)
- (string-match "^/?[^/]+" localname))
- (setq mount-pref (match-string 0 localname)))
+ (mount-spec
+ `(:array
+ ,@(cond
+ ((string-equal "smb" method)
+ (string-match "^/?\\([^/]+\\)" localname)
+ (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
+ (tramp-gvfs-mount-spec-entry "server" host)
+ (tramp-gvfs-mount-spec-entry "share" (match-string 1
localname))))
+ ((string-equal "obex" method)
+ (list (tramp-gvfs-mount-spec-entry "type" method)
+ (tramp-gvfs-mount-spec-entry
+ "host" (concat "[" (tramp-bluez-address host) "]"))))
+ ((string-match "\\`dav" method)
+ (list (tramp-gvfs-mount-spec-entry "type" "dav")
+ (tramp-gvfs-mount-spec-entry "host" host)
+ (tramp-gvfs-mount-spec-entry "ssl" ssl)))
+ (t
+ (list (tramp-gvfs-mount-spec-entry "type" method)
+ (tramp-gvfs-mount-spec-entry "host" host))))
+ ,@(when user
+ (list (tramp-gvfs-mount-spec-entry "user" user)))
+ ,@(when domain
+ (list (tramp-gvfs-mount-spec-entry "domain" domain)))
+ ,@(when port
+ (list (tramp-gvfs-mount-spec-entry "port" (number-to-string
port))))))
+ (mount-pref
+ (if (and (string-match "\\`dav" method)
+ (string-match "^/?[^/]+" localname))
+ (match-string 0 localname)
+ "/")))
;; Return.
`(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec)))
@@ -1718,11 +1707,11 @@
(when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t
:system tramp-hal-service device tramp-hal-interface-device
"PropertyExists" "sync.plugin")
- (add-to-list
- 'tramp-synce-devices
+ (pushnew
(with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t
:system tramp-hal-service device tramp-hal-interface-device
- "GetPropertyString" "pda.pocketpc.name"))))
+ "GetPropertyString" "pda.pocketpc.name")
+ tramp-synce-devices :test #'equal)))
(tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices)
tramp-synce-devices))
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2013-08-26 13:17:22 +0000
+++ b/lisp/net/tramp-sh.el 2013-09-03 20:14:58 +0000
@@ -2500,8 +2500,8 @@
'file-name-nondirectory (list localname)))
(setq localname (tramp-run-real-handler
'file-name-directory (list localname))))
- (unless full-directory-p
- (setq switches (add-to-list 'switches "-d" 'append)))
+ (unless (or full-directory-p (member "-d" switches))
+ (setq switches (append switches '("-d"))))
(setq switches (mapconcat 'tramp-shell-quote-argument switches " "))
(when wildcard
(setq switches (concat switches " " wildcard)))
@@ -4252,7 +4252,7 @@
?h (or (tramp-file-name-host (car target-alist)) ""))))
(with-parsed-tramp-file-name proxy l
;; Add the hop.
- (add-to-list 'target-alist l)
+ (pushnew l target-alist :test #'equal)
;; Start next search.
(setq choices tramp-default-proxies-alist)))))
@@ -4270,11 +4270,11 @@
vec 'file-error
"Connection `%s' is not supported for gateway access." hop))
;; Open the gateway connection.
- (add-to-list
- 'target-alist
+ (pushnew
(vector
(tramp-file-name-method hop) (tramp-file-name-user hop)
- (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil))
+ (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)
+ target-alist :test #'equal)
;; For the password prompt, we need the correct values.
;; Therefore, we must remember the gateway vector. But we
;; cannot do it as connection property, because it shouldn't
=== modified file 'lisp/net/tramp-smb.el'
--- a/lisp/net/tramp-smb.el 2013-08-26 13:17:22 +0000
+++ b/lisp/net/tramp-smb.el 2013-09-03 20:14:58 +0000
@@ -1364,14 +1364,14 @@
(while (not (eobp))
(setq entry (tramp-smb-read-file-entry share))
(forward-line)
- (when entry (add-to-list 'res entry))))
+ (when entry (pushnew entry res :test #'equal))))
;; Cache share entries.
(unless share
(tramp-set-connection-property v "share-cache" res)))
;; Add directory itself.
- (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0)))
+ (pushnew '("" "drwxrwxrwx" 0 (0 0)) res :test #'equal)
;; There's a very strange error (debugged with XEmacs 21.4.14)
;; If there's no short delay, it returns nil. No idea about.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114123: * lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):,
Stefan Monnier <=