The modest-config Reference Manual

This is the modest-config Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:22:11 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 modest-config

A modest config file loader library

Author

Torbjørn Marø <>

License

MIT

Source

modest-config.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 modest-config/modest-config.asd

Source

modest-config.asd.

Parent Component

modest-config (system).

ASDF Systems

modest-config.


3.1.2 modest-config/package.lisp

Source

modest-config.asd.

Parent Component

modest-config (system).

Packages

modest-config.


3.1.3 modest-config/modest-config.lisp

Dependency

package.lisp (file).

Source

modest-config.asd.

Parent Component

modest-config (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 modest-config

Source

package.lisp.

Nickname

modest

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-config (identifier bindings &body body)

Example where there exists a file foobar.config that contains a plist with properties HOST and PORT:

(with-config :foobar (host port)
(format t "Host is ~a~%" host)
(format t "Port is ~a~%" port))

Identifier may be nil to load file based on modest conventions:

(with-config nil (host port)
(format t "Host is ~a~%" host)
(format t "Port is ~a~%" port))

Package

modest-config.

Source

modest-config.lisp.


5.1.2 Ordinary functions

Function: find-config (&optional identifier)

Finds the config filename based on identifier and some conventions. Identifier may be nil, a symbol, or a filename (with or without path). If config file can’t be found a condition is raised.

Package

modest-config.

Source

modest-config.lisp.

Function: load-config (&optional identifier)

Simply reads the first element from config file,
assumed to be a property list, and returns it.
If identifier already is a list, it’s assumed to be the config and modestly returned.

Package

modest-config.

Source

modest-config.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: assert-config-exist (pathname)
Package

modest-config.

Source

modest-config.lisp.

Function: assert-one-exist (pathnames)
Package

modest-config.

Source

modest-config.lisp.

Function: find-by-conventions ()

Will probe for a file in this order: - current-package-name.config - modest.config
- ~/current-package-name.config

Package

modest-config.

Source

modest-config.lisp.

Function: find-by-symbol (symbol)

Will probe for a file in this order (given symbol ’foo or :foo): - FOO.config
- ~/FOO.config

Package

modest-config.

Source

modest-config.lisp.

Function: zip-bindings (map-f bindings)
Package

modest-config.

Source

modest-config.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables