[gnus git] branch master updated: n0-15-39-g96b11ae =1= * registry.el (initialize-instance, registry-db): Move the non-function initforms back to the class definition.

Ted Zlatanov <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  96b11ae6da3fed2ee5b4ae882e88a2efc6c63d21 (commit)
      from  036b6abe2a3748edcae4607dc16e4dbfdef09ddc (commit)


- Log -----------------------------------------------------------------
commit 96b11ae6da3fed2ee5b4ae882e88a2efc6c63d21
Author: Ted Zlatanov <[email protected]>
Date:   Tue Apr 5 13:42:34 2011 -0500

    * registry.el (initialize-instance, registry-db): Move the non-function initforms back to the class definition.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 114c20e..4150693 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,8 @@
 	(registry-lookup-breaks-before-lexbind): New method to demonstrate
 	pre-lexbind merge bug.
 	(registry-usage-test): Use it.
+	(initialize-instance, registry-db): Move the non-function initforms
+	back to the class definition.
 
 	* gnus-registry.el (gnus-registry-fixup-registry): New function to
 	fixup the parameters that can be customized by the user between
diff --git a/lisp/registry.el b/lisp/registry.el
index 6933725..3c4457d 100644
--- a/lisp/registry.el
+++ b/lisp/registry.el
@@ -99,17 +99,21 @@
             :custom float
             :documentation "The registry version.")
    (max-hard :initarg :max-hard
+             :initform 5000000
              :type integer
              :custom integer
              :documentation "Never accept more than this many elements.")
    (max-soft :initarg :max-soft
+             :initform 50000
              :type integer
              :custom integer
              :documentation "Prune as much as possible to get to this size.")
    (tracked :initarg :tracked
+            :initform nil
             :type t
             :documentation "The tracked (indexed) fields, a list of symbols.")
    (precious :initarg :precious
+             :initform nil
              :type t
              :documentation "The precious fields, a list of symbols.")
    (tracker :initarg :tracker
@@ -121,20 +125,11 @@
 
 (defmethod initialize-instance :after ((this registry-db) slots)
   "Set value of data slot of THIS after initialization."
-  ;; 'data' will already be set if read from file, so don't overwrite it.
-  (with-slots (data tracker tracked precious max-soft max-hard) this
+  (with-slots (data tracker) this
     (unless (member :data slots)
       (setq data (make-hash-table :size 10000 :rehash-size 2.0 :test 'equal)))
     (unless (member :tracker slots)
-      (setq tracker (make-hash-table :size 100 :rehash-size 2.0)))
-    (unless (member :max-soft slots)
-      (setq max-soft 50000))
-    (unless (member :max-hard slots)
-      (setq max-hard 5000000))
-    (unless (member :tracked slots)
-      (setq tracked nil))
-    (unless (member :precious slots)
-      (setq precious nil))))
+      (setq tracker (make-hash-table :size 100 :rehash-size 2.0)))))
 
 (defmethod registry-lookup ((db registry-db) keys)
   "Search for KEYS in the registry-db THIS.

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    2 ++
 lisp/registry.el |   17 ++++++-----------
 2 files changed, 8 insertions(+), 11 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
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.