Synch to No Gnus 200601240158.
[elisp/gnus.git-] / lisp / nnheader.el
index 51c84a6..193bcbf 100644 (file)
@@ -1,8 +1,8 @@
 ;;; nnheader.el --- header access macros for Semi-gnus and its backends
 
-;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
-;;        1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-;;        Free Software Foundation, Inc.
+;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994,
+;;   1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003,
+;;   2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -34,6 +34,8 @@
 (eval-when-compile (require 'cl))
 (eval-when-compile (require 'static))
 
+(defvar nnmail-extra-headers)
+
 ;; Requiring `gnus-util' at compile time creates a circular
 ;; dependency between nnheader.el and gnus-util.el.
 ;;(eval-when-compile (require 'gnus-util))
@@ -334,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)