* registry.el (registry-lookup-secondary, registry-full,
registry-prune, registry-collect-prune-candidates):
* gnus-registry.el (gnus-registry-load): Use slot names rather than
initarg names in `oref' and `oset'.
Continuation of 3db33f4
+2015-03-21 Eric Abrahamsen <eric@ericabrahamsen.net>
+
+ * registry.el (registry-lookup-secondary, registry-full)
+ (registry-prune, registry-collect-prune-candidates):
+ * gnus-registry.el (gnus-registry-load): Use slot names rather than
+ initarg names in `oref' and `oset'.
+
2015-03-19 Eric Abrahamsen <eric@ericabrahamsen.net>
* registry.el (registry-prune): Allow registry to reach full size
2015-03-19 Eric Abrahamsen <eric@ericabrahamsen.net>
* registry.el (registry-prune): Allow registry to reach full size
old-file-name file)))
(progn
(gnus-registry-read old-file-name)
old-file-name file)))
(progn
(gnus-registry-read old-file-name)
- (setf (oref gnus-registry-db :file) file)
+ (setf (oref gnus-registry-db file) file)
(gnus-message 1 "Registry filename changed to %s" file))
(gnus-registry-remake-db t))))
(error
(gnus-message 1 "Registry filename changed to %s" file))
(gnus-registry-remake-db t))))
(error
(when create
(puthash tracksym
(make-hash-table :size 800 :rehash-size 2.0 :test 'equal)
(when create
(puthash tracksym
(make-hash-table :size 800 :rehash-size 2.0 :test 'equal)
- (oref db :tracker))
- (gethash tracksym (oref db :tracker))))))
+ (oref db tracker))
+ (gethash tracksym (oref db tracker))))))
(defmethod registry-lookup-secondary-value ((db registry-db) tracksym val
&optional set)
(defmethod registry-lookup-secondary-value ((db registry-db) tracksym val
&optional set)
(defmethod registry-full ((db registry-db))
"Checks if registry-db THIS is full."
(>= (registry-size db)
(defmethod registry-full ((db registry-db))
"Checks if registry-db THIS is full."
(>= (registry-size db)
(defmethod registry-insert ((db registry-db) key entry)
"Insert ENTRY under KEY into the registry-db THIS.
(defmethod registry-insert ((db registry-db) key entry)
"Insert ENTRY under KEY into the registry-db THIS.
Returns the number of deleted entries."
(let ((size (registry-size db))
Returns the number of deleted entries."
(let ((size (registry-size db))
- (target-size (- (oref db :max-size)
- (* (oref db :max-size)
- (oref db :prune-factor))))
+ (target-size (- (oref db max-size)
+ (* (oref db max-size)
+ (oref db prune-factor))))
- (if (> size (oref db :max-size))
+ (if (> size (oref db max-size))
(progn
(setq candidates
(registry-collect-prune-candidates
(progn
(setq candidates
(registry-collect-prune-candidates
Proposes only entries without the :precious keys, and attempts to
return LIMIT such candidates. If SORTFUNC is provided, sort
entries first and return candidates from beginning of list."
Proposes only entries without the :precious keys, and attempts to
return LIMIT such candidates. If SORTFUNC is provided, sort
entries first and return candidates from beginning of list."
- (let* ((precious (oref db :precious))
+ (let* ((precious (oref db precious))
(precious-p (lambda (entry-key)
(cdr (memq (car entry-key) precious))))
(data (oref db data))
(precious-p (lambda (entry-key)
(cdr (memq (car entry-key) precious))))
(data (oref db data))