This is the chameleon Reference Manual, version 1.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:34:35 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
chameleon
Configuration management facilities for Common Lisp with multiple profile support.
YUE Daian
MIT
1.0.1
alexandria
(system).
src
(module).
Modules are listed depth-first from the system components tree.
chameleon/src
chameleon
(system).
chameleon.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
chameleon/src/chameleon.lisp
src
(module).
defconfig
(macro).
defprofile
(macro).
eval-once
(macro).
config-item-to-slot
(function).
eval-config-var
(function).
make-config-var-name
(function).
make-keyword
(function).
null-profile-error
(condition).
Packages are listed by definition order.
chameleon
common-lisp
.
defconfig
(macro).
defprofile
(macro).
eval-once
(macro).
config-item-to-slot
(function).
eval-config-var
(function).
make-config-var-name
(function).
make-keyword
(function).
null-profile-error
(condition).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Defines a configuration. The body CONFIGS contains multiple items,
with each following this pattern:
(name initial-value &optional docstring)
While calling this macro, all the given names, initial-values and
docstrings are evaluated during macro expansion.
Beneath the surface, DEFCONFIG actually generates the following stuff:
1. A variable *PROFILE*. It stores the current profile which is
desired to be a keyword.
2. A variable *CONFIG*. It stores the current configuration instance.
3. A class named CONFIG. Each item maps to a slot definition:
- name maps to slot name.
- initial-value maps to :initform argument.
- docstring maps to :documentation property of the slot.
4. A zero-arity inline function (and its setf version) for each
name. The function returns configuration value of current
profile. When the value itself is a function, it is called every
time and the value is returned. Otherwise, the value is directly
returned.
5. Some other helper functions and macros:
- with-profile
A typical example is:
(defconfig
(server-port 5001 "The server port.")
(app-dir "/tmp"))
Defines a profile with given NAME. CONFIGS is one or more lists,
with each following this pattern: (name value).
The evaluation rule of value follows DEFCONFIG.
It generates a variable *CONFIG-<NAME>* and a method SWITCH-PROFILE.
You may provide :before, :around or :after methods to SWITCH-PROFILE to insert some code.
Defines a closure to evaluate BODY for only once.
Convert given ITEM to CLOS slot. ITEM should be the a 2 or 3 length pair in config definition.
Make a keyword out of given string THING. The keyword is guaranteed to be upper case.
Jump to: | C D E F M |
---|
Jump to: | C D E F M |
---|
Jump to: | C F M N P S |
---|
Jump to: | C F M N P S |
---|