gnus-art.el (gnus-mime-buttonize-attachments-in-header): Improve criterion that finds...
[gnus] / lisp / gnus-compat.el
index 4e9b970..12a8587 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-compat.el --- Compatability functions for Gnus
 
-;; Copyright (C) 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: compat
@@ -129,10 +129,20 @@ TRASH is ignored."
       (forward-line arg))
     (beginning-of-line)))
 
-;; XEmacs 21.5
-(unless (fboundp 'set-buffer-multibyte)
-  (defun set-buffer-multibyte (flag)
-    nil))
+(unless (fboundp 'delete-dups)
+  (defun delete-dups (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."
+    (let ((tail list))
+      (while tail
+       (setcdr tail (delete (car tail) (cdr tail)))
+       (setq tail (cdr tail))))
+    list))
+
+(unless (fboundp 'declare-function)
+  (defmacro declare-function (&rest r)))
 
 (provide 'gnus-compat)