   Persists the given configuration by modifying
   the configured applications environment.
 
-  Returns the configured apps.
+  `config` should be a list of `{app, app_config}` tuples or a
+  `%{app => app_config}` map where `app` are the applications to
+  be configured and `app_config` are the configuration (as key-value
+  pairs) for each of those applications.
+
+  Returns the configured applications.
+
+  ## Examples
+
+      Mix.Config.persist(logger: [level: :error], my_app: [my_config: 1])
+      #=> [:logger, :my_app]
+
   """
   def persist(config) do
     for {app, kw} <- config do


  @doc """
  Reads many configuration files given by wildcard into a single config.
  Raises an error if `path` is a concrete filename (with no wildcards)
  but the corresponding file does not exist.
  """
  def read_wildcard!(path) do
    paths = if String.contains?(path, ~w(* ? [ {))do

      import_config "../apps/*/config/config.exs"

  """
  defmacro import_config(path_or_wildcard) do
    quote do
      Mix.Config.Agent.merge(
        var!(config_agent, Mix.Config),
         Mix.Config.read_wildcard!(Path.expand(unquote(path_or_wildcard), __DIR__))
      )
    end
  end

  @doc """
  Reads and validates a configuration file.

  `file` is the path to the configuration file to be read. If that file doesn't
  exist or if there's an error loading it, a `Mix.Config.LoadError` exception
  will be raised.
  """
  def read!(file) do
    try do
