emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105438: * lisp/gnus/gnus-score.el (g


From: Sam Steingold
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105438: * lisp/gnus/gnus-score.el (gnus-score-find-alist): Keep the score files already
Date: Fri, 12 Aug 2011 14:52:40 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105438
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Fri 2011-08-12 14:52:40 -0400
message:
  * 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.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-score.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-08-11 22:36:54 +0000
+++ b/lisp/gnus/ChangeLog       2011-08-12 18:52:40 +0000
@@ -1,3 +1,12 @@
+2011-08-12  Sam Steingold  <address@hidden>
+
+       * 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.
+
 2011-08-11  Andrew Cohen  <address@hidden>
 
        * nnimap.el (nnimap-transform-headers): BODYSTRUCTURE for messages of

=== modified file 'lisp/gnus/gnus-score.el'
--- a/lisp/gnus/gnus-score.el   2011-03-30 14:59:42 +0000
+++ b/lisp/gnus/gnus-score.el   2011-08-12 18:52:40 +0000
@@ -2834,8 +2834,7 @@
       ;; handle the multiple match alist
       (while alist
        (when (string-match (caar alist) group)
-         (setq score-files
-               (nconc score-files (copy-sequence (cdar alist)))))
+         (setq score-files (append (cdar alist) score-files)))
        (setq alist (cdr alist)))
       (setq alist gnus-score-file-single-match-alist)
       ;; handle the single match alist
@@ -2845,8 +2844,7 @@
          ;; and score-files is still nil.  -sj
          ;; this can be construed as a "stop searching here" feature :>
          ;; and used to simplify regexps in the single-alist
-         (setq score-files
-               (nconc score-files (copy-sequence (cdar alist))))
+         (setq score-files (append (cdar alist) score-files))
          (setq alist nil))
        (setq alist (cdr alist)))
       ;; cache the score files
@@ -2866,7 +2864,7 @@
       (when gnus-score-use-all-scores
        ;; Get the initial score files for this group.
        (when funcs
-         (setq score-files (nreverse (gnus-score-find-alist group))))
+         (setq score-files (copy-list (gnus-score-find-alist group))))
        ;; Add any home adapt files.
        (let ((home (gnus-home-score-file group t)))
          (when home
@@ -3013,7 +3011,7 @@
 
 (defun gnus-current-home-score-file (group)
   "Return the \"current\" regular score file."
-  (car (nreverse (gnus-score-find-alist group))))
+  (car (gnus-score-find-alist group)))
 
 ;;;
 ;;; Score decays


reply via email to

[Prev in Thread] Current Thread [Next in Thread]