[gnus git] branch master updated: m0-7-32-gdc4b49c =1= registry.el: Do not wrap methods in `eval-and-compile'
Katsumi Yamaoka <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via dc4b49c9acf9b7f6411f8bb923c14f2c13560f49 (commit)
from c5f073e9dcab6689c65b14735b169a91d5997963 (commit)
- Log -----------------------------------------------------------------
commit dc4b49c9acf9b7f6411f8bb923c14f2c13560f49
Author: David Engster <[email protected]>
Date: Sun Jun 2 22:30:48 2013 +0000
registry.el: Do not wrap methods in `eval-and-compile'
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ce46726..f0f9873 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2013-06-02 David Engster <[email protected]>
+
+ * registry.el (initialize-instance, registry-lookup)
+ (registry-lookup-breaks-before-lexbind, registry-lookup-secondary)
+ (registry-lookup-secondary-value, registry-search, registry-delete)
+ (registry-insert, registry-reindex, registry-size, registry-prune): Do
+ not wrap methods in `eval-and-compile'. This breaks due to latest
+ changes in EIEIO (introduction of eieio-core.el).
+
2013-05-30 Glenn Morris <[email protected]>
* nnmail.el (nnmail-fancy-expiry-target):
diff --git a/lisp/registry.el b/lisp/registry.el
index 1b41b2d..2ebd029 100644
--- a/lisp/registry.el
+++ b/lisp/registry.el
@@ -131,8 +131,7 @@
:type hash-table
:documentation "The data hashtable.")))
-(eval-and-compile
- (defmethod initialize-instance :AFTER ((this registry-db) slots)
+(defmethod initialize-instance :AFTER ((this registry-db) slots)
"Set value of data slot of THIS after initialization."
(with-slots (data tracker) this
(unless (member :data slots)
@@ -141,7 +140,7 @@
(unless (member :tracker slots)
(setq tracker (make-hash-table :size 100 :rehash-size 2.0)))))
- (defmethod registry-lookup ((db registry-db) keys)
+(defmethod registry-lookup ((db registry-db) keys)
"Search for KEYS in the registry-db THIS.
Returns an alist of the key followed by the entry in a list, not a cons cell."
(let ((data (oref db :data)))
@@ -152,7 +151,7 @@ Returns an alist of the key followed by the entry in a list, not a cons cell."
(list k (gethash k data))))
keys))))
- (defmethod registry-lookup-breaks-before-lexbind ((db registry-db) keys)
+(defmethod registry-lookup-breaks-before-lexbind ((db registry-db) keys)
"Search for KEYS in the registry-db THIS.
Returns an alist of the key followed by the entry in a list, not a cons cell."
(let ((data (oref db :data)))
@@ -161,7 +160,7 @@ Returns an alist of the key followed by the entry in a list, not a cons cell."
when (gethash key data)
collect (list key (gethash key data))))))
- (defmethod registry-lookup-secondary ((db registry-db) tracksym
+(defmethod registry-lookup-secondary ((db registry-db) tracksym
&optional create)
"Search for TRACKSYM in the registry-db THIS.
When CREATE is not nil, create the secondary index hashtable if needed."
@@ -174,7 +173,7 @@ When CREATE is not nil, create the secondary index hashtable if needed."
(oref db :tracker))
(gethash tracksym (oref db :tracker))))))
- (defmethod registry-lookup-secondary-value ((db registry-db) tracksym val
+(defmethod registry-lookup-secondary-value ((db registry-db) tracksym val
&optional set)
"Search for TRACKSYM with value VAL in the registry-db THIS.
When SET is not nil, set it for VAL (use t for an empty list)."
@@ -184,7 +183,7 @@ When SET is not nil, set it for VAL (use t for an empty list)."
(when set
(puthash val (if (eq t set) '() set)
(registry-lookup-secondary db tracksym t)))
- (gethash val (registry-lookup-secondary db tracksym)))))
+ (gethash val (registry-lookup-secondary db tracksym))))
(defun registry--match (mode entry check-list)
;; for all members
@@ -206,8 +205,7 @@ When SET is not nil, set it for VAL (use t for an empty list)."
(or found
(registry--match mode entry (cdr-safe check-list))))))
-(eval-and-compile
- (defmethod registry-search ((db registry-db) &rest spec)
+(defmethod registry-search ((db registry-db) &rest spec)
"Search for SPEC across the registry-db THIS.
For example calling with :member '(a 1 2) will match entry '((a 3 1)).
Calling with :all t (any non-nil value) will match all.
@@ -228,7 +226,7 @@ The test order is to check :all first, then :member, then :regex."
(and regex (registry--match :regex v regex)))
collect k))))
- (defmethod registry-delete ((db registry-db) keys assert &rest spec)
+(defmethod registry-delete ((db registry-db) keys assert &rest spec)
"Delete KEYS from the registry-db THIS.
If KEYS is nil, use SPEC to do a search.
Updates the secondary ('tracked') indices as well.
@@ -261,17 +259,17 @@ With assert non-nil, errors out if the key does not exist already."
(remhash key data)))
keys))
- (defmethod registry-size ((db registry-db))
+(defmethod registry-size ((db registry-db))
"Returns the size of the registry-db object THIS.
This is the key count of the :data slot."
(hash-table-count (oref db :data)))
- (defmethod registry-full ((db registry-db))
+(defmethod registry-full ((db registry-db))
"Checks if registry-db THIS is full."
(>= (registry-size db)
(oref db :max-hard)))
- (defmethod registry-insert ((db registry-db) key entry)
+(defmethod registry-insert ((db registry-db) key entry)
"Insert ENTRY under KEY into the registry-db THIS.
Updates the secondary ('tracked') indices as well.
Errors out if the key exists already."
@@ -295,7 +293,7 @@ Errors out if the key exists already."
(registry-lookup-secondary-value db tr val value-keys))))
entry)
- (defmethod registry-reindex ((db registry-db))
+(defmethod registry-reindex ((db registry-db))
"Rebuild the secondary indices of registry-db THIS."
(let ((count 0)
(expected (* (length (oref db :tracked)) (registry-size db))))
@@ -314,7 +312,7 @@ Errors out if the key exists already."
(registry-lookup-secondary-value db tr val value-keys))))
(oref db :data))))))
- (defmethod registry-prune ((db registry-db) &optional sortfun)
+(defmethod registry-prune ((db registry-db) &optional sortfun)
"Prunes the registry-db object THIS.
Removes only entries without the :precious keys if it can,
then removes oldest entries first.
@@ -341,7 +339,7 @@ SORTFUN is passed only the two keys so it must look them up directly."
(registry-delete db candidates nil)
(length candidates))))
- (defmethod registry-prune-soft-candidates ((db registry-db))
+(defmethod registry-prune-soft-candidates ((db registry-db))
"Collects pruning candidates from the registry-db object THIS.
Proposes only entries without the :precious keys."
(let* ((precious (oref db :precious))
@@ -355,7 +353,7 @@ Proposes only entries without the :precious keys."
collect k)))
(list limit candidates)))
- (defmethod registry-prune-hard-candidates ((db registry-db))
+(defmethod registry-prune-hard-candidates ((db registry-db))
"Collects pruning candidates from the registry-db object THIS.
Proposes any entries over the max-hard limit minus size * prune-factor."
(let* ((data (oref db :data))
@@ -365,7 +363,7 @@ Proposes any entries over the max-hard limit minus size * prune-factor."
(* (registry-size db) (oref db :prune-factor)))))
(candidates (loop for k being the hash-keys of data
collect k)))
- (list limit candidates))))
+ (list limit candidates)))
(provide 'registry)
;;; registry.el ends here
-----------------------------------------------------------------------
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 | 9 ++
lisp/registry.el | 376 +++++++++++++++++++++++++++---------------------------
2 files changed, 196 insertions(+), 189 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