+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.
(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."
(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.
"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.
(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."