2001-01-31 18:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 31 Jan 2001 23:10:54 +0000 (23:10 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 31 Jan 2001 23:10:54 +0000 (23:10 +0000)
* 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.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-sum.el
lisp/nnmail.el

index 30fbbc6..67a027b 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 4793504..1b9430d 100644 (file)
@@ -1817,23 +1817,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 5a809f3..0d6539e 100644 (file)
@@ -4255,28 +4255,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 3cad576..98c125f 100644 (file)
@@ -1092,8 +1092,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