diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-04-05 15:14:19 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-04-05 15:14:19 +0200 |
commit | 6686a31591d2d22a4d1c7b6e68a618823186c48e (patch) | |
tree | f1ede142778839c1e9ee98a13607681805767bbe /lisp/nxml/rng-util.el | |
parent | 20f7fa691b7c2859b96550d9ccb326bf394e160d (diff) | |
download | emacs-6686a31591d2d22a4d1c7b6e68a618823186c48e.tar.gz |
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.
Diffstat (limited to 'lisp/nxml/rng-util.el')
-rw-r--r-- | lisp/nxml/rng-util.el | 28 |
1 files changed, 8 insertions, 20 deletions
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 |