]> git.eshelyaron.com Git - emacs.git/commitdiff
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-574
authorMiles Bader <miles@gnu.org>
Tue, 4 Oct 2005 22:51:06 +0000 (22:51 +0000)
committerMiles Bader <miles@gnu.org>
Tue, 4 Oct 2005 22:51:06 +0000 (22:51 +0000)
Merge from gnus--rel--5.10

2005-10-04  Reiner Steib  <Reiner.Steib@gmx.de>

   * lisp/gnus/mm-url.el (mm-url-predefined-programs): Add switches for curl.

   * lisp/gnus/gnus-util.el (gnus-remove-duplicates): Remove.

   * lisp/gnus/nnmail.el (nnmail-article-group): Use mm-delete-duplicates
   instead of gnus-remove-duplicates.

   * lisp/gnus/message.el (message-remove-duplicates): Remove.
   (message-idna-to-ascii-rhs-1): Use mm-delete-duplicates instead of
   message-remove-duplicates.

   * lisp/gnus/mm-util.el (mm-delete-duplicates): Use `delete-dups' if
   available, else use implementation from `delete-dups'.

lisp/gnus/ChangeLog
lisp/gnus/ChangeLog.2
lisp/gnus/gnus-util.el
lisp/gnus/message.el
lisp/gnus/mm-url.el
lisp/gnus/mm-util.el
lisp/gnus/nnmail.el

index 69bfd79b4608f90c411d28752149390533175014..d013524a1c85a1cf680e4cfa3fa540f08efa54db 100644 (file)
@@ -1,4 +1,20 @@
-2005-09-30  Katsumi Yamaoka  <yamaoka@jpl.org>
+2005-10-04  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * mm-url.el (mm-url-predefined-programs): Add switches for curl.
+
+       * gnus-util.el (gnus-remove-duplicates): Remove.
+
+       * nnmail.el (nnmail-article-group): Use mm-delete-duplicates
+       instead of gnus-remove-duplicates.
+
+       * message.el (message-remove-duplicates): Remove.
+       (message-idna-to-ascii-rhs-1): Use mm-delete-duplicates instead of
+       message-remove-duplicates.
+
+       * mm-util.el (mm-delete-duplicates): Use `delete-dups' if
+       available, else use implementation from `delete-dups'.
+
+2005-10-02  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * time-date.el: Autoload parse-time-string, XEmacs needs it.
 
index f39bf525db82f9e53914ebc3b405e8746ba43968..50b978e7e75ba784b3fbb4e9350b38fd4439d34c 100644 (file)
        instead of mm-auto-save-coding-system for the draft or delayed
        group.
 
-2002-10-28  Josh  <huber@alum.wpi.edu>
+2002-10-28  Josh Huber  <huber@alum.wpi.edu>
 
        * mml.el (mml-mode-map): Fixed keybindings for mml-secure-*
        functions.
index 5556a815d2a4873d58c0d94e96f499254189af5b..f7fb279f20f5b8a797e7f2d79633583e16f9e8a3 100644 (file)
@@ -1037,14 +1037,6 @@ This function saves the current buffer."
         (set-buffer gnus-group-buffer)
         (eq major-mode 'gnus-group-mode))))
 
-(defun gnus-remove-duplicates (list)
-  (let (new)
-    (while list
-      (or (member (car list) new)
-         (setq new (cons (car list) new)))
-      (setq list (cdr list)))
-    (nreverse new)))
-
 (defun gnus-remove-if (predicate list)
   "Return a copy of LIST with all items satisfying PREDICATE removed."
   (let (out)
index 95a6dbc3b6d63d06f297c0ca223d05b5c44b290d..d64d8dbd2bf25486af2f5fc2d1d95d601f76558b 100644 (file)
@@ -2027,14 +2027,6 @@ With prefix-argument just set Follow-Up, don't cross-post."
 
 ;;; End of functions adopted from `message-utils.el'.
 
-(defun message-remove-duplicates (list)
-  (let (new)
-    (while list
-      (or (member (car list) new)
-         (setq new (cons (car list) new)))
-      (setq list (cdr list)))
-    (nreverse new)))
-
 (defun message-remove-header (header &optional is-regexp first reverse)
   "Remove HEADER in the narrowed buffer.
 If IS-REGEXP, HEADER is a regular expression.
@@ -4963,7 +4955,7 @@ subscribed address (and not the additional To and Cc header contents)."
        rhs ace  address)
     (when field
       (dolist (rhs
-              (message-remove-duplicates
+              (mm-delete-duplicates
                (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
                        (mapcar 'downcase
                                (mapcar
index 4fd39e477f698693f1a53bab9bea6645ded2ed8f..b24f9d4132a37794315f1c7378d0cee754696b69 100644 (file)
@@ -64,7 +64,7 @@
   '((wget "wget" "--user-agent=mm-url" "-q" "-O" "-")
     (w3m  "w3m" "-dump_source")
     (lynx "lynx" "-source")
-    (curl "curl" "--silent")))
+    (curl "curl" "--silent" "--user-agent mm-url" "--location")))
 
 (defcustom mm-url-program
   (cond
index 339bd0f746a4a5c847624c578bcfa89b6208f5e5..42ca8e232fddd78f653fa3d4f9752fac8b403bd1 100644 (file)
@@ -568,14 +568,21 @@ If the charset is `composition', return the actual one."
     ;; This is for XEmacs.
     (mm-mule-charset-to-mime-charset charset)))
 
-(defun mm-delete-duplicates (list)
-  "Simple substitute for CL `delete-duplicates', testing with `equal'."
-  (let (result head)
-    (while list
-      (setq head (car list))
-      (setq list (delete head list))
-      (setq result (cons head result)))
-    (nreverse result)))
+(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))
 
 ;; Fixme:  This is used in places when it should be testing the
 ;; default multibyteness.  See mm-default-multibyte-p.
index 98563143243c0466223a52dca2c22102c7589ff5..ad913d441b7376bf3c719d01095058cc0ff3eba8 100644 (file)
@@ -1142,7 +1142,7 @@ FUNC will be called with the group name to determine the article number."
                       5 "Error in `nnmail-split-methods'; using `bogus' mail group")
                      (sit-for 1)
                      '("bogus")))))
-             (setq split (gnus-remove-duplicates split))
+             (setq split (mm-delete-duplicates split))
              ;; The article may be "cross-posted" to `junk'.  What
              ;; to do?  Just remove the `junk' spec.  Don't really
              ;; see anything else to do...