From 6686a31591d2d22a4d1c7b6e68a618823186c48e Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 5 Apr 2021 15:14:19 +0200 Subject: Remove local uniquify functions in favour of seq-uniq * lisp/emacs-lisp/seq.el (seq-uniq): Add autoload cookie. * lisp/pcomplete.el: (pcomplete-uniquify-list): Use seq-uniq. * lisp/eshell/esh-util.el (eshell-uniqify-list) (eshell-uniquify-list): * lisp/nxml/rng-util.el (rng-uniquify-equal): * lisp/progmodes/idlwave.el (idlwave-uniquify): * lisp/textmodes/artist.el (artist-uniq): Make into obsolete function aliases for seq-uniq. Update callers. * lisp/nxml/rng-util.el (rng-uniquify-eq): Make obsolete in favor of seq-uniq. Update callers. --- lisp/nxml/rng-util.el | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'lisp/nxml/rng-util.el') diff --git a/lisp/nxml/rng-util.el b/lisp/nxml/rng-util.el index a20e95086cb..67e2ee9f1e3 100644 --- a/lisp/nxml/rng-util.el +++ b/lisp/nxml/rng-util.el @@ -36,26 +36,6 @@ (defconst rng-builtin-datatypes-uri (rng-make-datatypes-uri "")) -(defun rng-uniquify-eq (list) - "Destructively remove `eq' duplicates from LIST." - (and list - (let ((head list)) - (while (cdr head) - (if (eq (car head) (cadr head)) - (setcdr head (cddr head))) - (setq head (cdr head))) - list))) - -(defun rng-uniquify-equal (list) - "Destructively remove `equal' duplicates from LIST." - (and list - (let ((head list)) - (while (cdr head) - (if (equal (car head) (cadr head)) - (setcdr head (cddr head))) - (setq head (cdr head))) - list))) - (defun rng-blank-p (str) (string-match "\\`[ \t\n\r]*\\'" str)) (defun rng-substq (new old list) @@ -104,6 +84,14 @@ LIST is not modified." (define-error 'rng-error nil) +;; Obsolete. + +(defun rng-uniquify-eq (list) + (declare (obsolete seq-uniq "28.1")) + (seq-uniq list #'eq)) + +(define-obsolete-function-alias 'rng-uniquify-equal #'seq-uniq "28.1") + (provide 'rng-util) ;;; rng-util.el ends here -- cgit v1.2.3