From: yamaoka Date: Wed, 31 Jan 2001 22:10:44 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_0-05-quimby-last-~21 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1716495bb060cc4755b3b82797a3e5109f5748cc;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 012dd64..6bbf2e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2001-01-31 15:00:00 ShengHuo ZHU + + * gnus-sum.el (gnus-summary-remove-list-identifiers): Similar. + + * gnus-art.el (article-hide-list-identifiers): Similar. + +2001-01-31 Karl Kleinpaste + + * nnmail.el (nnmail-remove-list-identifiers): Improved. + +2001-01-31 09:00:00 ShengHuo ZHU + + * gnus-score.el (gnus-summary-score-entry): match may be an integer. + 2001-01-30 10:00:00 ShengHuo ZHU * gnus-util.el (gnus-string-equal): New function. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index fa5c36f..1108eba 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -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." diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index a70d9ff..cc173c3 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -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. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 1f256c2..089376b 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -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. diff --git a/lisp/nnmail.el b/lisp/nnmail.el index c26f018..3b59d16 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -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."