(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)))
(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)
(let ((trail (gethash id gnus-registry-hashtb)))
(dolist (crumb trail)
(when (stringp crumb)
- (return crumb))))))
+ (return (gnus-group-short-name crumb)))))))
(defun gnus-registry-group-count (id)
"Get the number of groups of a message, based on the message ID."