Synch with Oort Gnus.
authoryamaoka <yamaoka>
Wed, 31 Jan 2001 23:41:06 +0000 (23:41 +0000)
committeryamaoka <yamaoka>
Wed, 31 Jan 2001 23:41:06 +0000 (23:41 +0000)
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-sum.el
lisp/nnmail.el

index 6bbf2e8..b1f6e2a 100644 (file)
@@ -1,3 +1,11 @@
+2001-01-31 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnmail.el (nnmail-remove-list-identifiers): Use consp.
+
+       * gnus-art.el (article-hide-list-identifiers): Ditto.
+
+       * gnus-sum.el (gnus-summary-remove-list-identifiers): Ditto.
+
 2001-01-31 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-sum.el (gnus-summary-remove-list-identifiers): Similar.
index 1108eba..fddef97 100644 (file)
@@ -1972,23 +1972,24 @@ If FORCE, decode the article whether it is marked as base64 not."
   "Remove list identifies from the Subject header.
 The `gnus-list-identifiers' variable specifies what to do."
   (interactive)
-  (save-excursion
-    (save-restriction
-      (let ((inhibit-point-motion-hooks t)
-           buffer-read-only)
-       (article-narrow-to-head)
-       (let ((regexp (if (stringp gnus-list-identifiers) gnus-list-identifiers
-                       (mapconcat 'identity gnus-list-identifiers " *\\|"))))
-         (when regexp
-           (goto-char (point-min))
-           (while (re-search-forward
-                   (concat "^Subject: +\\(R[Ee]: +\\)*\\(" regexp " *\\)")
-                   nil t)
-             (delete-region (match-beginning 2) (match-end 0))
-             (beginning-of-line))
-           (when (re-search-forward 
-                  "^Subject: +\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" nil t)
-             (delete-region (match-beginning 1) (match-end 1)))))))))
+  (let ((inhibit-point-motion-hooks t)
+       (regexp (if (consp gnus-list-identifiers)
+                   (mapconcat 'identity gnus-list-identifiers " *\\|")
+                 gnus-list-identifiers))
+       buffer-read-only)
+    (when regexp
+      (save-excursion
+       (save-restriction
+         (article-narrow-to-head)
+         (goto-char (point-min))
+         (while (re-search-forward
+                 (concat "^Subject: +\\(R[Ee]: +\\)*\\(" regexp " *\\)")
+                 nil t)
+           (delete-region (match-beginning 2) (match-end 0))
+           (beginning-of-line))
+         (when (re-search-forward
+                "^Subject: +\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" nil t)
+           (delete-region (match-beginning 1) (match-end 1))))))))
 
 (defun article-hide-pgp ()
   "Remove any PGP headers and signatures in the current article."
index 089376b..baa6065 100644 (file)
@@ -4282,28 +4282,29 @@ or a straight list of headers."
 
 (defun gnus-summary-remove-list-identifiers ()
   "Remove list identifiers in `gnus-list-identifiers' from articles in the current group."
-  (let ((regexp (if (stringp gnus-list-identifiers)
-                   gnus-list-identifiers
-                 (mapconcat 'identity gnus-list-identifiers " *\\|")))
+  (let ((regexp (if (consp gnus-list-identifiers)
+                   (mapconcat 'identity gnus-list-identifiers " *\\|")
+                 gnus-list-identifiers))
        changed subject)
-    (dolist (header gnus-newsgroup-headers)
-      (setq subject (mail-header-subject header)
-           changed nil)
-      (while (string-match
-             (concat "^\\(R[Ee]: +\\)*\\(" regexp " *\\)")
-             subject)
-       (setq subject
-             (concat (substring subject 0 (match-beginning 2))
-                     (substring subject (match-end 0)))
-             changed t))
-      (when (and changed
-                (string-match
-                  "^\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" subject))
-       (setq subject
-             (concat (substring subject 0 (match-beginning 1))
-                     (substring subject (match-end 1)))))
-      (when changed
-       (mail-header-set-subject header subject)))))
+    (when regexp
+      (dolist (header gnus-newsgroup-headers)
+       (setq subject (mail-header-subject header)
+             changed nil)
+       (while (string-match
+               (concat "^\\(R[Ee]: +\\)*\\(" regexp " *\\)")
+               subject)
+         (setq subject
+               (concat (substring subject 0 (match-beginning 2))
+                       (substring subject (match-end 0)))
+               changed t))
+       (when (and changed
+                  (string-match
+                   "^\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" subject))
+         (setq subject
+               (concat (substring subject 0 (match-beginning 1))
+                       (substring subject (match-end 1)))))
+       (when changed
+         (mail-header-set-subject header subject))))))
 
 (defun gnus-select-newsgroup (group &optional read-all select-articles)
   "Select newsgroup GROUP.
index 3b59d16..cb70183 100644 (file)
@@ -1102,8 +1102,10 @@ Return the number of characters in the body."
 
 (defun nnmail-remove-list-identifiers ()
   "Remove list identifiers from Subject headers."
-  (let ((regexp (if (stringp nnmail-list-identifiers) nnmail-list-identifiers
-                 (mapconcat 'identity nnmail-list-identifiers " *\\|"))))
+  (let ((regexp 
+        (if (consp nnmail-list-identifiers) 
+            (mapconcat 'identity nnmail-list-identifiers " *\\|")
+          nnmail-list-identifiers)))
     (when regexp
       (goto-char (point-min))
       (while (re-search-forward