Subsections

4 Modules

4.1 Anatomy

A Notion module usually consists of a 'mod_mymodule' directory with a 'mymodule.c' and a 'mod_mymodule.lua'. It is common for configuration to go into a 'cfg_modulename.lua' file in the configuration directory.

4.1.1 The lua part

The lua part of the module is defined in the Makefile of the module as the MODULE_STUB. When no MODULE_STUB is defined, an automatically generated stub is created:

ioncore.load_module('mod_mymodule')

-- Mark ourselves loaded. 
package.loaded['mod_mymodule']=true