What's required in a personal init.lua?

From: phayz <russelldicken....at.gmail.com>
Date: Tue, 30 Mar 2010 15:49:06 -0700 (PDT)

I'm utterly confused about what's required in a personal init.lua. The
manual states -

"After loading the core modules, Textadept begins loading additional
modules. It first checks for a ~/.textadept/init.lua user module. If
the module is found, it is run and skips loading the default modules
specified in init.lua. Otherwise a mixture of core extension and
generic modules are loaded.

After loading the additional modules, Textadept parses command line
arguments, or if none are specified, reloads the last saved session."

I simply don't understand this. It first seems to say that if a
personal init.lua is found, it doesn't load the init.lua which is
distributed with Textadept. However it goes on to say "Otherwise a
mixture of core extension and generic modules are loaded." I have
looked over some of Textadept's code and it appears that does a
regular expression search for modules, loading those it finds.

To put my question in concrete terms, I will give an example. I want
to use the Bufferutils module, so I download the file bufferutils.lua
from the Textadept wiki and save it to ~/.textadept/modules (albeit
under Windows). I then create an EMPTY init.lua - ~/.textadept/
init.lua and add the line "require 'bufferutils' ". When I run
Textadept I get the following text appear in a GTK (?) error dialog
box: "C:\z\downloads\textadept/init.lua:19: C:\z\downloads\textadept/
modules/bufferutils.lua:91: attempt to index local 'keys' (a nil
value)". However if I add this line to the init.lua file distributed
with Textadept I don't get any error message and the expected
functionality works as expected.

Where am I going wrong?
Received on Tue 30 Mar 2010 - 18:49:06 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:41:42 EST