#### 2.5.2 Configuration parameters

A Lepton configuration parameter consists of three components:

Group

  A string which identifies the general category in which the parameter lies (e.g. which application and/or plugin).

Name

  A string which specifically identifies the parameter within the group.

Value

  The value of the parameter. This is stored as a string, but can be converted to a number of possible scalar and list types.

Groups, names and values are all case-sensitive.

#### 2.5.2.1 Configuration groups and keys

Function: config-groups cfg

  Returns a list of all groups available in cfg and its parent contexts.

  Since 1.10.

Function: config-has-group? cfg group

  Determines whether cfg or its parent contexts contain the specified group

  Since 1.10.

Function: config-keys cfg group

  Returns a list of all keys available in the specified group in cfg and its parent contexts.

  Since 1.10.

Function: config-has-key? cfg group key

  Determines whether cfg or its parent contexts contains key in the specified group.

  Since 1.10.

Function: config-remove-key! cfg group key

  Removes the configuration parameter identified by the given group and key in the configuration context cfg. Returns ‘`#t`’ on success, ‘`#f`’ otherwise.

Function: config-remove-group! cfg group

  Removes the configuration group identified by group and all its parameters in the configuration context cfg. Returns ‘`#t`’ on success, ‘`#f`’ otherwise.

#### 2.5.2.2 Configuration inheritance

If a configuration context does not directly specify a value for a configuration parameter, it inherits the value from its parent context.

See Context parents.

Function: config-inherited? cfg group key

  Returns ‘`#f`’ if value of the configuration parameter with the given group and key is specified in the context cfg, and ‘`#t`’ if it is inherited from a parent context of cfg.

  Since 1.10.

Function: config-source cfg group key

  Returns the configuration context (either cfg or one of its parent contexts) in which the configuration parameter with the given group and key has its value defined.

  Since 1.10.

#### 2.5.2.3 Configuration values

Each value is stored as a UTF-8 string in the configuration file. However, this string can be parsed a several different types. All of the following types are supported:

- Strings
- Booleans
- Exact integers
- Inexact real numbers

In addition, lists of all the above are supported.

Function: config-string cfg group key

  Retrieve configuration value as a string.

  Since 1.10.

Function: config-boolean cfg group key

  Retrieve configuration value as a boolean.

  Since 1.10.

Function: config-int cfg group key

  Retrieve configuration value as an exact integer.

  Since 1.10.

Function: config-real cfg group key

  Retrieve configuration value as an inexact real number.

  Since 1.10.

Function: config-string-list cfg group key

  Retrieve configuration value as a list of strings.

  Since 1.10.

Function: config-boolean-list cfg group key

  Retrieve configuration value as a list of booleans.

  Since 1.10.

Function: config-int-list cfg group key

  Retrieve configuration value as a list of exact integers.

  Since 1.10.

Function: config-real-list cfg group key

  Retrieve configuration value as a list of inexact real numbers.

  Since 1.10.

Function: set-config! cfg group key value

  Set the configuration parameter identified by the given group and key in the configuration context cfg. The type of value to set is inferred from value. Returns cfg.

  Since 1.10.