(spam-stat-to-hash-table): Use :size argument in
authorJesper Harder <harder@ifa.au.dk>
Tue, 20 Jan 2004 22:56:57 +0000 (22:56 +0000)
committerJesper Harder <harder@ifa.au.dk>
Tue, 20 Jan 2004 22:56:57 +0000 (22:56 +0000)
make-hash-table.

lisp/ChangeLog
lisp/spam-stat.el

index a20cd07..256ba92 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-20  Jesper Harder  <harder@ifa.au.dk>
+
+       * spam-stat.el (spam-stat-to-hash-table): Use :size argument in
+       make-hash-table.
+
 2004-01-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * canlock.el (base64-encode-string): Don't autoload it.
index bbbba63..8464c2b 100644 (file)
@@ -399,7 +399,8 @@ the word string, NGOOD is the number of good mails it has appeared in,
 NBAD is the number of bad mails it has appeared in, GOOD is the number
 of times it appeared in good mails, and BAD is the number of times it
 has appeared in bad mails."
-  (let ((table (make-hash-table :test 'equal)))
+  (let ((table (make-hash-table :size (length entries)
+                               :test 'equal)))
     (mapc (lambda (l)
            (puthash (car l)
                     (spam-stat-make-entry (nth 1 l) (nth 2 l))