From ff73a2206e994e9c4f73012d680f6e98a4154244 Mon Sep 17 00:00:00 2001 From: Jesper Harder Date: Sun, 11 Jan 2004 18:31:48 +0000 Subject: [PATCH] (gnus-summary-remove-list-identifiers): Don't cons a new string in every iteration. Use shy groups. --- lisp/ChangeLog | 5 +++++ lisp/gnus-sum.el | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0d0850d5..93039aa85 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-01-11 Jesper Harder + + * gnus-sum.el (gnus-summary-remove-list-identifiers): Don't cons + a new string in every iteration. Use shy groups. + 2004-01-10 Jesper Harder * gnus-start.el (gnus-subscribe-newsgroup, gnus-start-draft-setup) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 592bd3411..961908970 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -4962,23 +4962,20 @@ or a straight list of headers." gnus-list-identifiers)) changed subject) (when regexp + (setq regexp (concat "^\\(?:R[Ee]: +\\)*\\(" regexp " *\\)")) (dolist (header gnus-newsgroup-headers) (setq subject (mail-header-subject header) changed nil) - (while (string-match - (concat "^\\(R[Ee]: +\\)*\\(" regexp " *\\)") - subject) + (while (string-match regexp subject) (setq subject - (concat (substring subject 0 (match-beginning 2)) + (concat (substring subject 0 (match-beginning 1)) (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 + (when (string-match "^\\(\\(?:R[Ee]: +\\)+\\)R[Ee]: +" subject) + (setq subject + (concat (substring subject 0 (match-beginning 1)) + (substring subject (match-end 1))))) (mail-header-set-subject header subject)))))) (defun gnus-fetch-headers (articles) -- 2.34.1