(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
: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
(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.