Re: [code] corrections, improvements and so on...

From: Mitchell <m.att.foicica.com>
Date: Thu, 6 Apr 2017 23:01:43 -0400 (EDT)

Hi,

On Thu, 6 Apr 2017, Pascal wrote:

> hi everybody,
>
> could I have your critical and wise look on these 200 lines of code that
> allowed me to model TA as I understood it ?

That looks fine to me. The only thing I'd recommend is move your xml
keybindings outside the `events.LEXER_LOADED` event:

   if not keys.xml then keys.xml = {} end
   keys.xml[key1] = f1
   keys.xml[key2] = f2

Where key1 and f1 are the string key sequence and Lua function to run,
respectively.

That way you are not re-assigning the same keys every time you load an XML
file.

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 Thu 06 Apr 2017 - 23:01:43 EDT

This archive was generated by hypermail 2.2.0 : Fri 07 Apr 2017 - 06:54:27 EDT