Re: [code] I need help adding a language-specific snippet

From: Mitchell <m.att.foicica.com>
Date: Tue, 7 May 2013 17:14:16 -0400 (Eastern Daylight Time)

Russell,

On Wed, 8 May 2013, Russell Dickenson wrote:

> Mitchell,
>
> OK - I am confused again. :(
>
> In your latest email message you say that the use of post_init.lua is
> custom modules which either supplement or replace functionality defined
> in Textadept's own modules. You also make it clear that you should not
> create an init.lua *and* an post_init.lua. But earlier in this thread
> you said :
>
> <quote> Sure. When you want to customize the behavior for specific
> languages, you would normally create a language specific module in your
> *~/.textadept/modules/[lang]/* folder. Such a module needs to have an
> *init.lua* file (this is standard Lua practice) that is run when
> Textadept loads the module. Even if that directory exists, Textadept
> will not recognize it as a module unless it has an *init.lua* in it.
> Only when such a module is detected does Textadept then run a
> *post_init.lua* file. In your case, no XML module was detected so your
> *post_init.lua* file was never run. </quote>
>
> So how can a post_init.lua file be loaded automatically by Textadept if
> there is no init.lua in the same directory?

Sorry about the confusion. Textadept loads language-specific modules from
one of two places: it's own *modules/* directory or your
*~/.textadept/modules/* directory. As long as it finds a module in either
one, you're good to go and any *post_init.lua* files are loaded.

I hope that clears things up.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 07 May 2013 - 17:14:16 EDT

This archive was generated by hypermail 2.2.0 : Wed 08 May 2013 - 06:53:26 EDT