Synch to No Gnus 200601241028.
[elisp/gnus.git-] / lisp / nnheader.el
index 522377e..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>
@@ -24,8 +24,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -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)