Commit 692bce5b authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/net/tramp-smb.el: Avoid using `add-to-list' on a let-local var

* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use `delete-dups'.
* lisp/net/tramp.el (auto-save-file-name-transforms): Declare.
parent 3f4a192b
......@@ -649,8 +649,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(directory &optional full match nosort)
"Like `directory-files' for Tramp files."
(let ((result (mapcar 'directory-file-name
(file-name-all-completions "" directory)))
res)
(file-name-all-completions "" directory))))
;; Discriminate with regexp.
(when match
(setq result
......@@ -665,9 +664,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
result)))
;; Sort them if necessary.
(unless nosort (setq result (sort result 'string-lessp)))
;; Remove double entries.
(dolist (elt result res)
(add-to-list 'res elt 'append))))
(delete-dups result)))
(defun tramp-smb-handle-expand-file-name (name &optional dir)
"Like `expand-file-name' for Tramp files."
......
......@@ -4043,6 +4043,7 @@ Return the local name of the temporary file."
'tramp-delete-temp-file-function)))
;;; Auto saving to a special directory:
(defvar auto-save-file-name-transforms)
(defun tramp-handle-make-auto-save-file-name ()
"Like `make-auto-save-file-name' for Tramp files.
......
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