mu-scm: add options, some tweaks
Add the (options) procedure + docs. Some internal tweaks / clean-ups.
This commit is contained in:
@ -24,7 +24,6 @@
|
||||
#:export (
|
||||
;; classes
|
||||
<store>
|
||||
*default-store*
|
||||
|
||||
mfind
|
||||
mcount
|
||||
@ -69,6 +68,9 @@
|
||||
cc
|
||||
bcc
|
||||
|
||||
;; misc
|
||||
options
|
||||
|
||||
;; helpers
|
||||
iso-date->time-t
|
||||
time-t->iso-date))
|
||||
@ -289,12 +291,12 @@ not found."
|
||||
|
||||
;; Store
|
||||
;;
|
||||
;; Note: we have a *default-store*, which is the store we opened during
|
||||
;; Note: we have a %default-store, which is the store we opened during
|
||||
;; startup; for now that's the only store supported, but we keep things
|
||||
;; open.
|
||||
;;
|
||||
;; Since it's the default store, we'd like to call the methods without
|
||||
;; explicitly using *default-store*; with GOOPS, we cannot pass a default for
|
||||
;; explicitly using %default-store; with GOOPS, we cannot pass a default for
|
||||
;; that, nor can we use keyword arguments (I think?). So use define* for that.
|
||||
|
||||
;; the 'store-object' is a foreign object wrapping a const Store*.
|
||||
@ -306,23 +308,23 @@ not found."
|
||||
"Make a store from some STORE-OBJECT."
|
||||
(make <store> #:store-object store-object))
|
||||
|
||||
(define *default-store*
|
||||
;; default-store-object is defined in mu-scm-store.cc
|
||||
(make-store default-store-object))
|
||||
(define %default-store
|
||||
;; %default-store-object is defined in mu-scm-store.cc
|
||||
(make-store %default-store-object))
|
||||
|
||||
(define* (mfind query
|
||||
#:key
|
||||
(store *default-store*)
|
||||
(store %default-store)
|
||||
(related? #f)
|
||||
(skip-dups? #f)
|
||||
(sort-field 'date)
|
||||
(reverse? #f)
|
||||
(max-results #f))
|
||||
"Find messages matching some query. The query is mandatory,
|
||||
the other (keyword) arguments are optional.
|
||||
"Find messages matching some query.
|
||||
|
||||
The query is mandatory, the other (keyword) arguments are optional. | ||||