aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2011-08-12 14:52:40 -0400
committerSam Steingold2011-08-12 14:52:40 -0400
commit29dbb8f772081d2f325b894257f3062d6ea404c8 (patch)
treee47814c6e3eb7df840723fb90e7c27ab87a1f034
parent1a834b22e8c5a729b95ab255fd7d7006e973a961 (diff)
downloademacs-29dbb8f772081d2f325b894257f3062d6ea404c8.tar.gz
emacs-29dbb8f772081d2f325b894257f3062d6ea404c8.zip
* lisp/gnus/gnus-score.el (gnus-score-find-alist): Keep the score files already
in the reverse order to avoid modifying the cache with `nreverse'. (gnus-all-score-files): Do not modify the value returned by `gnus-score-find-alist' because it lives in a cache variable. (gnus-current-home-score-file): No need to `nreverse' the return value of `gnus-score-find-alist', it is already in the correct order.
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-score.el10
2 files changed, 13 insertions, 6 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7f4116d6636..8fc250d1dcb 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,12 @@
12011-08-12 Sam Steingold <sds@gnu.org>
2
3 * gnus-score.el (gnus-score-find-alist): Keep the score files already
4 in the reverse order to avoid modifying the cache with `nreverse'.
5 (gnus-all-score-files): Do not modify the value returned by
6 `gnus-score-find-alist' because it lives in a cache variable.
7 (gnus-current-home-score-file): No need to `nreverse' the return value
8 of `gnus-score-find-alist', it is already in the correct order.
9
12011-08-11 Andrew Cohen <cohen@andy.bu.edu> 102011-08-11 Andrew Cohen <cohen@andy.bu.edu>
2 11
3 * nnimap.el (nnimap-transform-headers): BODYSTRUCTURE for messages of 12 * nnimap.el (nnimap-transform-headers): BODYSTRUCTURE for messages of
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index 9bbfbfb057e..099d06d6439 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -2834,8 +2834,7 @@ The list is determined from the variable `gnus-score-file-alist'."
2834 ;; handle the multiple match alist 2834 ;; handle the multiple match alist
2835 (while alist 2835 (while alist
2836 (when (string-match (caar alist) group) 2836 (when (string-match (caar alist) group)
2837 (setq score-files 2837 (setq score-files (append (cdar alist) score-files)))
2838 (nconc score-files (copy-sequence (cdar alist)))))
2839 (setq alist (cdr alist))) 2838 (setq alist (cdr alist)))
2840 (setq alist gnus-score-file-single-match-alist) 2839 (setq alist gnus-score-file-single-match-alist)
2841 ;; handle the single match alist 2840 ;; handle the single match alist
@@ -2845,8 +2844,7 @@ The list is determined from the variable `gnus-score-file-alist'."
2845 ;; and score-files is still nil. -sj 2844 ;; and score-files is still nil. -sj
2846 ;; this can be construed as a "stop searching here" feature :> 2845 ;; this can be construed as a "stop searching here" feature :>
2847 ;; and used to simplify regexps in the single-alist 2846 ;; and used to simplify regexps in the single-alist
2848 (setq score-files 2847 (setq score-files (append (cdar alist) score-files))
2849 (nconc score-files (copy-sequence (cdar alist))))
2850 (setq alist nil)) 2848 (setq alist nil))
2851 (setq alist (cdr alist))) 2849 (setq alist (cdr alist)))
2852 ;; cache the score files 2850 ;; cache the score files
@@ -2866,7 +2864,7 @@ The list is determined from the variable `gnus-score-file-alist'."
2866 (when gnus-score-use-all-scores 2864 (when gnus-score-use-all-scores
2867 ;; Get the initial score files for this group. 2865 ;; Get the initial score files for this group.
2868 (when funcs 2866 (when funcs
2869 (setq score-files (nreverse (gnus-score-find-alist group)))) 2867 (setq score-files (copy-list (gnus-score-find-alist group))))
2870 ;; Add any home adapt files. 2868 ;; Add any home adapt files.
2871 (let ((home (gnus-home-score-file group t))) 2869 (let ((home (gnus-home-score-file group t)))
2872 (when home 2870 (when home
@@ -3013,7 +3011,7 @@ If ADAPT, return the home adaptive file instead."
3013 3011
3014(defun gnus-current-home-score-file (group) 3012(defun gnus-current-home-score-file (group)
3015 "Return the \"current\" regular score file." 3013 "Return the \"current\" regular score file."
3016 (car (nreverse (gnus-score-find-alist group)))) 3014 (car (gnus-score-find-alist group)))
3017 3015
3018;;; 3016;;;
3019;;; Score decays 3017;;; Score decays