(gnus-registry-trim): Use append, not concat.
authorTeodor Zlatanov <tzz@lifelogs.com>
Fri, 18 Jan 2008 04:51:29 +0000 (04:51 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Fri, 18 Jan 2008 04:51:29 +0000 (04:51 +0000)
lisp/ChangeLog
lisp/gnus-registry.el

index 4841a26..ffb142f 100644 (file)
@@ -1,3 +1,7 @@
+2008-01-18  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-registry.el (gnus-registry-trim): Use append, not concat.
+
 2008-01-17  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-article-read-summary-keys): Work for some `A'
index c5faf84..ff1437a 100644 (file)
@@ -353,7 +353,7 @@ Any entries with extra data (marks, currently) are left alone."
         (let ((extra (gnus-registry-fetch-extra key)))
           (dolist (item gnus-registry-extra-entries-precious)
             (dolist (e extra)
-              (when (eq (nth 0 e) item)
+              (when (equal (nth 0 e) item)
                 (puthash key t precious)
                 (return))))
           (puthash key (gnus-registry-fetch-extra key 'mtime) timehash)))
@@ -364,18 +364,19 @@ Any entries with extra data (marks, currently) are left alone."
          (if (gethash key precious)
              (push item precious-list)
            (push item junk-list))))
-      
+
+      (sort 
+       junk-list
+       (lambda (a b)
+        (let ((t1 (or (cdr (gethash (car a) timehash)) 
+                      '(0 0 0)))
+              (t2 (or (cdr (gethash (car b) timehash)) 
+                      '(0 0 0))))
+          (time-less-p t1 t2))))
+
       ;; we use the return value of this setq, which is the trimmed alist
-      (setq alist
-           (concat
-            precious-list
-            (nthcdr
-             trim-length
-             (sort junk-list
-                   (lambda (a b)
-                     (time-less-p
-                      (or (cdr (gethash (car a) timehash)) '(0 0 0))
-                      (or (cdr (gethash (car b) timehash)) '(0 0 0)))))))))))
+      (setq alist (append precious-list
+                         (nthcdr trim-length junk-list))))))
   
 (defun gnus-registry-action (action data-header from &optional to method)
   (let* ((id (mail-header-id data-header))