This is the defconfig Reference Manual, version 1.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:57:29 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
defconfig
A configuration system for user exposed variables
szos at posteo dot net
GPLv3
1.2.1
alexandria
(system).
trivial-cltl2
(system).
package.lisp
(file).
macros.lisp
(file).
database.lisp
(file).
classes.lisp
(file).
conditions.lisp
(file).
defconfig.lisp
(file).
setv.lisp
(file).
access.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
defconfig/defconfig.asd
defconfig/package.lisp
defconfig/macros.lisp
defconfig/database.lisp
defconfig/classes.lisp
defconfig/conditions.lisp
defconfig/defconfig.lisp
defconfig/setv.lisp
defconfig/access.lisp
defconfig/macros.lisp
package.lisp
(file).
defconfig
(system).
atypecase
(macro).
defconfig/database.lisp
macros.lisp
(file).
defconfig
(system).
define-defconfig-db
(macro).
delete-db
(function).
get-db
(function).
get-db-var
(function).
list-dbs
(function).
*db-plist*
(special variable).
*default-db*
(special variable).
add-db-to-plist
(function).
db-key-exists-p
(function).
def-defconfig-db-error-check
(function).
defconfig-database
(type).
defconfig-database-p
(function).
getdb
(function).
make-config-database
(function).
defconfig/classes.lisp
database.lisp
(file).
defconfig
(system).
config-info-coercer
(reader method).
config-info-db
(reader method).
config-info-default-value
(reader method).
config-info-documentation
(reader method).
config-info-name
(reader method).
config-info-place
(reader method).
config-info-predicate
(reader method).
config-info-previous-value
(reader method).
config-info-tags
(reader method).
config-info-typespec
(reader method).
config-info-valid-values-description
(reader method).
initialize-instance
(method).
initialize-instance
(method).
print-object
(method).
print-object
(method).
print-object
(method).
accessor-config-info
(class).
config-info
(class).
config-info-direct-info
(class).
config-info-functions
(class).
config-info-metadata
(class).
config-info-prev-value
(reader method).
(setf config-info-prev-value)
(writer method).
config-info-tag-list
(reader method).
(setf config-info-tag-list)
(writer method).
config-info-values
(class).
generate-valid-values-coercer-string
(function).
generate-valid-values-predicate-string
(function).
generate-vv-string
(function).
minimal-config-info
(class).
slot-bound-p
(function).
defconfig/conditions.lisp
classes.lisp
(file).
defconfig
(system).
config-error
(condition).
database-already-exists-error
(condition).
invalid-coerced-datum-error
(condition).
invalid-datum-error
(condition).
no-bound-default-value-error
(condition).
no-config-found-error
(condition).
not-resettable-place-error
(condition).
setv-wrapped-error
(condition).
untrackable-place-error
(condition).
database-already-exists-error-key
(reader method).
invalid-coerced-datum-error-value
(reader method).
invalid-datum-error-config-object
(reader method).
invalid-datum-error-place
(reader method).
invalid-datum-error-value
(reader method).
no-config-found-error-db
(reader method).
no-config-found-error-place
(reader method).
setv-wrapped-error-condition
(reader method).
(setf setv-wrapped-error-condition)
(writer method).
untrackable-place-error-object
(reader method).
untrackable-place-error-place
(reader method).
with-atomic-setv-internal-error
(condition).
defconfig/defconfig.lisp
conditions.lisp
(file).
defconfig
(system).
defconfig
(macro).
defconfig-minimal
(macro).
define-accessor-config
(macro).
define-minimal-config
(macro).
define-variable-config
(macro).
defconf-a
(macro).
defconf-v
(macro).
define-min
(macro).
defconfig/setv.lisp
defconfig.lisp
(file).
defconfig
(system).
*setv-permissiveness*
(special variable).
psetv
(macro).
setv
(macro).
with-atomic-setv
(macro).
with-atomic-setv*
(macro).
%%setv
(macro).
%%setv-coerced
(macro).
%atomic-setv
(macro).
%atomic-setv-reset
(macro).
%fsetv-ensure-validity
(function).
%fsetv-get-config-info-object
(function).
%psetv
(macro).
%runtime-atomic-setv
(macro).
%runtime-atomic-setv-reset
(macro).
%runtime-setv-with-reset
(macro).
%setv-ensure-setf
(macro).
%setv-with-reset
(macro).
%with-atomic-setv*
(macro).
destructuring-keys
(macro).
remove-keys
(function).
setv-atomic
(macro).
with-runtime-atomic-setv
(macro).
defconfig/access.lisp
setv.lisp
(file).
defconfig
(system).
clean-previous-value
(generic function).
reset-computed-place
(generic function).
reset-place
(macro).
search-configurable-objects
(function).
tag-configurable-place
(function).
%%with-config-info
(function).
config-info-search-in-db
(function).
config-info-search-tags
(function).
list-of-strings-p
(function).
place->config-info
(function).
with-config-info
(macro).
Packages are listed by definition order.
defconfig
common-lisp
.
*setv-permissiveness*
(special variable).
clean-previous-value
(generic function).
config-error
(condition).
config-info-coercer
(generic reader).
config-info-db
(generic reader).
config-info-default-value
(generic reader).
config-info-documentation
(generic reader).
config-info-name
(generic reader).
config-info-place
(generic reader).
config-info-predicate
(generic reader).
config-info-previous-value
(generic reader).
config-info-tags
(generic reader).
config-info-typespec
(generic reader).
config-info-valid-values-description
(generic reader).
database-already-exists-error
(condition).
defconfig
(macro).
defconfig-minimal
(macro).
define-accessor-config
(macro).
define-defconfig-db
(macro).
define-minimal-config
(macro).
define-variable-config
(macro).
delete-db
(function).
get-db
(function).
get-db-var
(function).
invalid-coerced-datum-error
(condition).
invalid-datum-error
(condition).
list-dbs
(function).
no-bound-default-value-error
(condition).
no-config-found-error
(condition).
not-resettable-place-error
(condition).
psetv
(macro).
reset-computed-place
(generic function).
reset-place
(macro).
search-configurable-objects
(function).
setv
(macro).
setv-wrapped-error
(condition).
tag-configurable-place
(function).
untrackable-place-error
(condition).
with-atomic-setv
(macro).
with-atomic-setv*
(macro).
%%setv
(macro).
%%setv-coerced
(macro).
%%with-config-info
(function).
%atomic-setv
(macro).
%atomic-setv-reset
(macro).
%fsetv-ensure-validity
(function).
%fsetv-get-config-info-object
(function).
%psetv
(macro).
%runtime-atomic-setv
(macro).
%runtime-atomic-setv-reset
(macro).
%runtime-setv-with-reset
(macro).
%setv-ensure-setf
(macro).
%setv-with-reset
(macro).
%with-atomic-setv*
(macro).
*db-plist*
(special variable).
*default-db*
(special variable).
accessor-config-info
(class).
add-db-to-plist
(function).
atypecase
(macro).
config-info
(class).
config-info-direct-info
(class).
config-info-functions
(class).
config-info-metadata
(class).
config-info-prev-value
(generic reader).
(setf config-info-prev-value)
(generic writer).
config-info-search-in-db
(function).
config-info-search-tags
(function).
config-info-tag-list
(generic reader).
(setf config-info-tag-list)
(generic writer).
config-info-values
(class).
database-already-exists-error-key
(generic reader).
db-key-exists-p
(function).
def-defconfig-db-error-check
(function).
defconf-a
(macro).
defconf-v
(macro).
defconfig-database
(type).
defconfig-database-p
(function).
define-min
(macro).
destructuring-keys
(macro).
generate-valid-values-coercer-string
(function).
generate-valid-values-predicate-string
(function).
generate-vv-string
(function).
getdb
(function).
invalid-coerced-datum-error-value
(generic reader).
invalid-datum-error-config-object
(generic reader).
invalid-datum-error-place
(generic reader).
invalid-datum-error-value
(generic reader).
list-of-strings-p
(function).
make-config-database
(function).
minimal-config-info
(class).
no-config-found-error-db
(generic reader).
no-config-found-error-place
(generic reader).
place->config-info
(function).
remove-keys
(function).
setv-atomic
(macro).
setv-wrapped-error-condition
(generic reader).
(setf setv-wrapped-error-condition)
(generic writer).
slot-bound-p
(function).
untrackable-place-error-object
(generic reader).
untrackable-place-error-place
(generic reader).
with-atomic-setv-internal-error
(condition).
with-config-info
(macro).
with-runtime-atomic-setv
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Determines how setv will act when no config-info object is
found. :STRICT means to error out. :GREEDY means to search through all registered
databases for a config-info object and use the first one that is found, or if none
is found error out. :PERMISSIVE means to setf when a config-info object isnt
found. :GREEDY+PERMISSIVE means to search through all registered databases and
use the first object found, but if one isnt found to setf regardless.
Defconfig defines a config-info object and potentially a dynamic variable.
PLACE may be either a symbol or a list of length 1. If PLACE is a list, defconfig
functions as a wrapper around define-accessor-config. If it is a symbol,
defconfig defines a variable config as well as a dynamic variable. Additionally,
if the first element of ARGS is a keyword and the second element of ARGS is not
a keyword, the default value will be the value of PLACE.
The following keys are acceptable in ARGS: VALIDATOR, TYPESPEC, COERCER,
DOCUMENTATION, DB, TAGS, and REGEN-CONFIG. REINITIALIZE is also acceptable if
PLACE is a symbol.
VALIDATOR and TYPESPEC may not coexist in a single defconfig call. VALIDATOR is
for providing a function to validate values. It must take a single value, the
value to validate. TYPESPEC takes a type specification and generates a
validation function from it.
If provided, COERCER must be a function taking a single argument: the value to
coerce. It is called iff an invalid value is passed to setv, and it is called on
the invalid value in an attempt to generate a valid one. The return value of
COERCER is checked against the VALIDATOR (or the function generated with
TYPESPEC) and if it is valid it is used in place of the original value.
DOCUMENTATION is the documentation of PLACE and is used in the
defvar/defparameter form when PLACE is a symbol and is placed in the config-info
object regardless of whether PLACE is a symbol or a list.
DB is the database to place the generated config-info object into, and defaults
to *default-db*. Defconfig does not check if DB is in the plist of databases
before placing the config-info object into DB. It is assumed that if a DB has
been removed from the database plist the user has a good understanding of what
they are doing and is managing the database themselves. (databases must be
manually removed from the plist).
TAGS are strings that can be used to search for a config-info object. The search functionality is currently only partially implemented.
Define a minimal config, with no value tracking.
Define an accessor config object and place it in DB with the key ACCESSOR
define a dynamic variable name VAR to be a defconfig database accessible by passing KEY to the function get-db. If PARAMETER is true, create this var with a defparameter form, otherwise use defvar. DOC is the documentation to pass to the def(parameter|var) form.
define a minimal config object for PLACE and in DB.
Define a variable config object and place it in DB with the key PLACE.
The setv equivalent of psetf - set all places in parallel
looks up PLACE in DB and set it to its default or previous value.
Setv must get an even number of ARGS - every place must have a value. Setv can also take the key argument :db, to specify which database to look up config objects in.
This macro, upon encountering an error, resets all places encountered within calls to setv to be reset to the value they held before the call to with-atomic-setv. Which errors to reset upon can be controlled with HANDLE-CONDITIONS. If it is nil, it defaults to ’error. If a handled condition is encountered, it will be wrapped in SETV-WRAPPED-ERROR, unless RE-ERROR is nil, in which case a warning will be generated and the condition will be returned.
delete the database associated with KEY. if MAKUNBOUND is T, then unbind the symbol holding the database associated with KEY
get the database associated with KEY
get the variable holding the database associated with KEY
list all defconfig databases
Returns a list of all configurable objects matching TERM. If DATABASE-KEY is provided, search only in that database.
Push TAG onto the list of tags for the config-info object associated with PLACE in DB.
use to set the previous value of PLACE to the default value. This is useful for places that may hold a large object which you want gc’d
symbol
) &key db) ¶config-info
) &key db) ¶list
) &key db) ¶accessor-config-info
) &key db) ¶config-info-functions
)) ¶The function by which invalid datum will attempt to be coerced
config-info-direct-info
)) ¶the database that the config info object is housed in.
db
.
config-info-values
)) ¶The default value of this config-info object
config-info-metadata
)) ¶The docstring for the place being governed. if a variable it is the same as the variables docstring
config-info-metadata
)) ¶The formal name by which this config-info object can be searched for
name
.
config-info-direct-info
)) ¶The place which this config info governs.
config-info-functions
)) ¶The predicate against which valid values are checked
config-info-values
)) ¶holds the value previously assigned to the config-info object. initially the same as default-value
config-info-metadata
)) ¶Tags which can be used for finding a config-info object
tags
.
config-info-metadata
)) ¶When a typespec is provided instead of a validator, this slot will hold it
config-info-metadata
)) ¶An explanation of the valid values and predicate function
Reset PLACE to its default value, unless PREVIOUS-VALUE is true, then reset to the previous value. TEST is used to check if a reset is needed.
symbol
) &key db test previous-value) ¶config-info
) &key db test previous-value) ¶list
) &key db test previous-value) ¶accessor-config-info
) &key db test previous-value) ¶minimal-config-info
) &key db test previous-value) ¶accessor-config-info
) &key) ¶config-info
) &key) ¶accessor-config-info
) stream) ¶minimal-config-info
) stream) ¶config-info
) stream) ¶This condition is the root condition for all defconfig conditions. If one wants to catch all defconfig conditions (such as with handler-case) then config-error should be used.
error
.
This condition indicates KEY already denotes a database in *db-plist*
:key
This slot is read-only.
This condition indicates that coercion was attempted on VALUE, producing COERCED-VALUE, and that COERCED-VALUE is invalid for PLACE-FORM
(quote nil)
:coerced-value
This slot is read-only.
This condition indicates that VALUE is invalid for PLACE-FORM
(quote nil)
:place
This slot is read-only.
(quote nil)
:value
This slot is read-only.
(quote nil)
:config-object
This slot is read-only.
This condition indicates that the default-value slot of OBJECT is unbound. This will only be signalled when trying to reset a place to its default value.
This condition indicates that PLACE-FORM does not denote a config-info object in DATABASE
This condition indicates that a reset was attempted on an accessor place.
This condition is only ever signalled from within WITH-ATOMIC-SETV, and indicates that an error was caught which caused WITH-ATOMIC-SETV to reset all places found within its body. It has one slot, CONDITION, which contains the condition that was caught.
common-lisp
.
:error
A plist holding all databases for defconfig
The default database for defconfig
generates a set of calls to %setv-with-reset.
this macro resets all encountered places within a call to with-atomic-setv*.
Wrap setv in a handler to catch all errors, which will reset all encountered places, after which it returns the condition from the named block.
This macro utilizes compiler-let to allow rollbacks of accessor stuff.
separates keys from list, storing the remainder in VAR, and making each key a variable via destructuring-bind.
this version of setv saves the original value of the places being set, and resets all to their original value if an error is encountered. the error is then resignalled. It is generally advisable to use WITH-ATOMIC-SETV instead.
check VALUE against CONFIG-INFO-OBJECTs predicate. return VALUE if it passes. If ERRORP is true error if VALUE doesnt pass. If ERRORP is nil and VALUE doesnt pass, return INVALID-SYMBOL. Restarts are put in place to provide a value or set regardless.
return setf symbol if we want the caller to setf place. setf-symbol only needs to be provided if were calling this in a setv expansion.
add a database to *db-plist* in the correct format of (KEY (VARNAME value)). VARNAME is the quoted variable referencing the database, while value is the symbol-value of VARNAME. for internal use only
takes a term, as well as a namespace and a database. the :db keyarg should be a database as returned by make-config-database. the :namespace keyarg should be one of :both :accessor or :variable. Note that the namespace keyarg isnt used if term is a symbol. Term should be either a string, a list of strings, a symbol, or a list of symbols representing an accessor and a place.
return t/nil if KEY denotes a pre-existing db
Check that KEY is a keyword and doesnt already denotes a database in *db-plist*. If it does signal an error within the context of a use-value restart to allow the user to provide a new value to use instead of KEY
used internally by defconfig to wrap around getf - think of it as currying getf with *db-plist* as the place
Return a cons of two hash tables
returns two values - accumulated non-keys and keys
config-info-values
)) ¶config-info-values
)) ¶holds the value previously assigned to the config-info object. initially the same as default-value
config-info-metadata
)) ¶config-info-metadata
)) ¶Tags which can be used for finding a config-info object
tags
.
database-already-exists-error
)) ¶key
.
invalid-coerced-datum-error
)) ¶invalid-datum-error
)) ¶invalid-datum-error
)) ¶invalid-datum-error
)) ¶no-config-found-error
)) ¶no-config-found-error
)) ¶setv-wrapped-error
)) ¶setv-wrapped-error
)) ¶untrackable-place-error
)) ¶untrackable-place-error
)) ¶the database that the config info object is housed in.
(or symbol cons)
:db
This slot is read-only.
The place which this config info governs.
symbol
:place
This slot is read-only.
The predicate against which valid values are checked
(function (t) boolean)
(function identity)
:predicate
This slot is read-only.
The function by which invalid datum will attempt to be coerced
(or function null)
:coercer
This slot is read-only.
The formal name by which this config-info object can be searched for
"unnamed config-info object"
:name
This slot is read-only.
Tags which can be used for finding a config-info object
(quote nil)
:tags
The docstring for the place being governed. if a variable it is the same as the variables docstring
(or string null)
:documentation
This slot is read-only.
An explanation of the valid values and predicate function
:valid-values
This slot is read-only.
When a typespec is provided instead of a validator, this slot will hold it
This slot is read-only.
The default value of this config-info object
:default
This slot is read-only.
holds the value previously assigned to the config-info object. initially the same as default-value
:previous
Jump to: | %
(
A C D F G I L M N P R S T U W |
---|
Jump to: | %
(
A C D F G I L M N P R S T U W |
---|
Jump to: | *
C D K N O P S T V |
---|
Jump to: | *
C D K N O P S T V |
---|
Jump to: | A C D F I M N P S T U W |
---|
Jump to: | A C D F I M N P S T U W |
---|