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

index 012dd64..6bbf2e8 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-31 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-sum.el (gnus-summary-remove-list-identifiers): Similar.
+
+       * gnus-art.el (article-hide-list-identifiers): Similar.
+
+2001-01-31  Karl Kleinpaste <karl@charcoal.com>
+
+       * nnmail.el (nnmail-remove-list-identifiers): Improved.
+
+2001-01-31 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-score.el (gnus-summary-score-entry): match may be an integer.
+
 2001-01-30 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-util.el (gnus-string-equal): New function.
index fa5c36f..1108eba 100644 (file)
@@ -1981,15 +1981,14 @@ The `gnus-list-identifiers' variable specifies what to do."
                        (mapconcat 'identity gnus-list-identifiers " *\\|"))))
          (when regexp
            (goto-char (point-min))
-           (when (re-search-forward
-                  (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp
-                          " *\\)\\)+\\(Re: +\\)?\\)")
-                  nil t)
-             (let ((s (or (match-string 3) (match-string 5))))
-               (delete-region (match-beginning 1) (match-end 1))
-               (when s
-                 (goto-char (match-beginning 1))
-                 (insert s))))))))))
+           (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 a70d9ff..cc173c3 100644 (file)
@@ -842,11 +842,11 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header."
                       (int-to-string match)
                     match))))
 
-    (set-text-properties 0 (length match) nil match)
-
     ;; If this is an integer comparison, we transform from string to int.
-    (when (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
-      (setq match (string-to-int match)))
+    (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
+       (if (stringp match)
+           (setq match (string-to-int match)))
+      (set-text-properties 0 (length match) nil match))
 
     (unless (eq date 'now)
       ;; Add the score entry to the score file.
index 1f256c2..089376b 100644 (file)
@@ -4284,19 +4284,26 @@ or a straight list of headers."
   "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 " *\\|"))))
+                 (mapconcat 'identity gnus-list-identifiers " *\\|")))
+       changed subject)
     (dolist (header gnus-newsgroup-headers)
-      (when (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp
-                                 " *\\)\\)+\\(Re: +\\)?\\)")
-                         (mail-header-subject header))
-       (mail-header-set-subject
-        header (concat (substring (mail-header-subject header)
-                                  0 (match-beginning 1))
-                       (or
-                        (match-string 3 (mail-header-subject header))
-                        (match-string 5 (mail-header-subject header)))
-                       (substring (mail-header-subject header)
-                                  (match-end 1))))))))
+      (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 c26f018..3b59d16 100644 (file)
@@ -1106,10 +1106,14 @@ Return the number of characters in the body."
                  (mapconcat 'identity nnmail-list-identifiers " *\\|"))))
     (when regexp
       (goto-char (point-min))
-      (when (re-search-forward
-            (concat "^Subject: +\\(Re: +\\)?\\(" regexp " *\\)")
-            nil t)
-       (delete-region (match-beginning 2) (match-end 0))))))
+      (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))
+       (beginning-of-line)))))
 
 (defun nnmail-remove-tabs ()
   "Translate TAB characters into SPACE characters."