lf4ed.config

LuaFAR for Editor

lf4ed.config


Get or set the plugin configuration.

cfg = lf4ed.config ([newcfg])

Parameters:
  newcfg:  table
           Fields of newcfg (every field is optional):
             ReloadDefaultScript : boolean
             RequireWithReload   : boolean
             UseStrict           : boolean
             ReturnToMainMenu    : boolean

Returns:
  cfg:     table (the configuration as it was before the call)

Description:
  If newcfg is given, it is a table with configuration
  parameters to be set. Parameters not contained in this
  table will remain unchanged. This means that
  (newcfg.param == false) will set 'param' to false, but
  (newcfg.param == nil) will leave 'param' as it was before
  the call.
  Returned is a copy of the "old" configuration table (as it
  was before the call).

  If newcfg is not given, an up-to-date copy of the
  configuration table is returned. This table contains the
  same fields as the newcfg table described above.

Note:
  Configuration changes done by a user script via this
  function are reverted by the plugin after the user script
  exits.