diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 4ecc804bf20..eedb5a3e9ba 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -647,7 +647,7 @@ your laptop to different networks frequently." "Return a list of (user host) tuples allowed to access for METHOD. This function is added always in `tramp-get-completion-function' for all methods. Resulting data are derived from connection history." - (delete-dups + (seq-uniq (tramp-compat-seq-keep (lambda (key) (let ((tramp-verbose 0)) diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el index 72b1934faca..07f4ef74581 100644 --- a/lisp/net/tramp-fuse.el +++ b/lisp/net/tramp-fuse.el @@ -59,11 +59,10 @@ (let ((result (tramp-skeleton-directory-files directory full match nosort count ;; Some storage systems do not return "." and "..". - (delete-dups - (append - '("." "..") - (tramp-fuse-remove-hidden-files - (directory-files (tramp-fuse-local-file-name directory)))))))) + (seq-union + '("." "..") + (tramp-fuse-remove-hidden-files + (directory-files (tramp-fuse-local-file-name directory))))))) (if full ;; Massage the result. (let ((local (rx diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 7f3ac945bb6..c283c119b87 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -2556,7 +2556,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." (split-string (shell-command-to-string (format "avahi-browse -trkp %s" service)) (rx (+ (any "\r\n"))) 'omit (rx bol "+;" (* nonl) eol))))) - (delete-dups + (seq-uniq (tramp-compat-seq-keep (lambda (x) (ignore-errors diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 0a454fed69b..8922adb7586 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2770,7 +2770,7 @@ The method used must be an out-of-band method." #'file-name-directory (list localname)))) (unless (or full-directory-p (member "-d" switches)) (setq switches (append switches '("-d")))) - (setq switches (delete-dups switches) + (setq switches (seq-uniq switches) switches (mapconcat #'tramp-shell-quote-argument switches " ")) (when wildcard (setq switches (concat switches " " wildcard))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a27e8b8fbe8..e8f791c567b 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2729,7 +2729,7 @@ This avoids problems during autoload, when `load-path' contains remote file names." ;; We expect all other Tramp files in the same directory as tramp.el. (let* ((dir (expand-file-name (file-name-directory (locate-library "tramp")))) - (files (delete-dups + (files (seq-uniq (mapcar #'file-name-sans-extension (directory-files @@ -2803,12 +2803,11 @@ whether HANDLER is to be called. Add operations defined in ;; Mark `operations' the handler is responsible for. (put #'tramp-file-name-handler 'operations - (delete-dups - (append - (get 'tramp-file-name-handler 'operations) - (mapcar - #'car - (symbol-value (intern (concat (symbol-name handler) "-alist")))))))) + (seq-union + (get 'tramp-file-name-handler 'operations) + (mapcar + #'car + (symbol-value (intern (concat (symbol-name handler) "-alist"))))))) (defun tramp-exists-file-name-handler (operation &rest args) "Check, whether OPERATION runs a file name handler." @@ -2979,7 +2978,7 @@ not in completion mode." BODY is the backend specific code." (declare (indent 2) (debug t)) `(ignore-error file-missing - (delete-dups (delq nil (delete "" + (seq-uniq (delq nil (delete "" (let* ((case-fold-search read-file-name-completion-ignore-case) (result (progn ,@body))) ;; Some storage systems do not return "." and "..". @@ -3372,7 +3371,7 @@ as for \"~/.authinfo.gpg\"." This function is added always in `tramp-get-completion-function' for all methods. Resulting data are derived from default settings." (and tramp-completion-use-auth-sources - (delete-dups + (seq-uniq (tramp-compat-seq-keep (lambda (x) `(,(plist-get x :user) ,(plist-get x :host))) (auth-source-search @@ -3401,7 +3400,7 @@ User is always nil." (with-temp-buffer (insert-file-contents-literally filename) (goto-char (point-min)) - (delete-dups (delq nil + (seq-uniq (delq nil (cl-loop while (not (eobp)) collect (funcall function)))))))) (defun tramp-parse-rhosts (filename) @@ -3538,7 +3537,7 @@ Host is always \"localhost\"." (defun tramp-parse-netrc (filename) "Return a list of (user host) tuples allowed to access. User may be nil." - (delete-dups + (seq-uniq (tramp-compat-seq-keep (lambda (item) (and (assoc "machine" item) @@ -5347,8 +5346,8 @@ should be set connection-local.") (or (not (stringp buffer)) (not (tramp-tramp-file-p buffer))) (or (not (stringp stderr)) (not (tramp-tramp-file-p stderr)))))) -;; This function is used by tramp-*-handle-make-process and -;; tramp-sh-handle-process-file to filter local environment variables +;; This function is used by `tramp-*-handle-make-process' and +;; `tramp-sh-handle-process-file' to filter local environment variables ;; that should not be propagated remotely. Users can override this ;; function if necessary, for example, to ensure that a specific ;; environment variable is applied to remote processes, whether it diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 0ff0f3ddd4d..33dc0b9d4af 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -559,7 +559,7 @@ This checks also `file-name-as-directory', `file-name-directory', (let (;; We test for the summary line. Keyword "total" could be localized. (process-environment - (append '("LANG=C" "LANGUAGE=C" "LC_ALL=C") process-environment))) + (seq-union '("LANG=C" "LANGUAGE=C" "LC_ALL=C") process-environment))) (unwind-protect (progn (with-temp-buffer diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 7b90bb4d9be..e011b99be57 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -3515,7 +3515,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." (tmp-name2 (expand-file-name "foo" tmp-name1)) ;; We test for the summary line. Keyword "total" could be localized. (process-environment - (append '("LANG=C" "LANGUAGE=C" "LC_ALL=C") process-environment))) + (seq-union '("LANG=C" "LANGUAGE=C" "LC_ALL=C") process-environment))) (unwind-protect (progn (make-directory tmp-name1) @@ -5656,8 +5656,7 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'." (ert-deftest tramp-test30-make-process () "Check `make-process'." :tags (append '(:expensive-test :tramp-asynchronous-processes) - (and (getenv "EMACS_EMBA_CI") - '(:unstable))) + (and (getenv "EMACS_EMBA_CI") '(:unstable))) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-supports-processes-p)) @@ -7887,8 +7886,8 @@ This requires restrictions of file name syntax." "🌈🍒👋") (when (and (tramp--test-expensive-test-p) (not (tramp--test-windows-nt-p))) - (delete-dups - (mapcar + (seq-uniq + (tramp-compat-seq-keep ;; Use all available language specific snippets. (lambda (x) (and