From 6433e9b0db6389b491674a9b7344f7565c2dd886 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Fri, 6 Jun 2003 15:43:07 +0000 Subject: [PATCH] (gnus-registry-trim): fix for when gnus-registry-max-entries is nil --- lisp/ChangeLog | 5 +++++ lisp/gnus-registry.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fb99781dd..5a12b54e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-06-06 Teodor Zlatanov + + * gnus-registry.el (gnus-registry-trim): fix for when + gnus-registry-max-entries is nil + 2003-06-05 Lars Magne Ingebrigtsen * qp.el (quoted-printable-decode-region): Don't error out on diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el index 54756a1b1..b2a66c286 100644 --- a/lisp/gnus-registry.el +++ b/lisp/gnus-registry.el @@ -179,7 +179,9 @@ The group names are matched, they don't have to be fully qualified." (defun gnus-registry-trim (alist) "Trim alist to size, using gnus-registry-max-entries." - (unless (null gnus-registry-max-entries) + (if (null gnus-registry-max-entries) + alist ; just return the alist + ;; else, when given max-entries, trim the alist (let ((timehash (make-hash-table :size 4096 :test 'equal))) @@ -188,6 +190,7 @@ The group names are matched, they don't have to be fully qualified." (puthash key (gnus-registry-fetch-extra key 'mtime) timehash)) gnus-registry-hashtb) + ;; we use the return value of this setq, which is the trimmed alist (setq alist (nthcdr (- (length alist) gnus-registry-max-entries) -- 2.25.1