Synch to No Gnus 200601241028.
[elisp/gnus.git-] / lisp / nnheader.el
index 8888fc3..193bcbf 100644 (file)
@@ -336,7 +336,24 @@ nil, ."
     (cond
      ((fboundp 'char-or-char-int-p) 'char-or-char-int-p)
      ((fboundp 'char-valid-p) 'char-valid-p)
-     (t 'identity))))
+     (t 'identity)))
+
+  ;; Should keep track of the same function in mm-util.el.
+  (if (fboundp 'delete-dups)
+      (defalias 'mm-delete-duplicates 'delete-dups)
+    (defun mm-delete-duplicates (list)
+      "Destructively remove `equal' duplicates from LIST.
+Store the result in LIST and return it.  LIST must be a proper list.
+Of several `equal' occurrences of an element in LIST, the first
+one is kept.
+
+This is a compatibility function for Emacsen without `delete-dups'."
+      ;; Code from `subr.el' in Emacs 22:
+      (let ((tail list))
+       (while tail
+         (setcdr tail (delete (car tail) (cdr tail)))
+         (setq tail (cdr tail))))
+      list)))
 
 ;; mail-parse stuff.
 (unless (featurep 'mail-parse)