Changes committed gnus/lisp (ChangeLog gnus-registry.el)

"Ted Zlatanov" <[email protected]>
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog gnus-registry.el

(gnus-registry-trim): Use append, not concat.


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1736 gnus/lisp/ChangeLog:7.1737
--- ChangeLog:7.1736	Thu Jan 17 05:03:42 2008
+++ ChangeLog	Fri Jan 18 05:51:29 2008
@@ -1,3 +1,7 @@
+2008-01-18  Teodor Zlatanov  <[email protected]>
+
+	* gnus-registry.el (gnus-registry-trim): Use append, not concat.
+
 2008-01-17  Katsumi Yamaoka  <[email protected]>
 
 	* gnus-art.el (gnus-article-read-summary-keys): Work for some `A'
Index: gnus-registry.el
diff -u gnus/lisp/gnus-registry.el:7.43 gnus/lisp/gnus-registry.el:7.44
--- gnus-registry.el:7.43	Wed Jan 16 22:45:14 2008
+++ gnus-registry.el	Fri Jan 18 05:51:29 2008
@@ -353,7 +353,7 @@
 	 (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 @@
 	  (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))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.