Re: [code] [textadept] Language specific settings

From: Richard Philips <richard.philips.att.gmail.com>
Date: Thu, 30 Jan 2014 12:36:02 +0100

Hello Mitchell,

> This kind of feature is built-in to buffers. Since buffers are
> individual Lua tables, what you described can be done using properties:
>
> buffer.dictionary_function = myfunction
>
> --[[ and then later ]]
>
> myfunction = buffer.dictionary_function
>
> Your custom properties exist individually per-buffer.
>
> I hope I'm understanding your use-case correctly.
>
>

This is what I am doing right now :-)

The problem with this approach is that this is somewhat disorganized.
If the buffer API changes it could lead to name conflicts.

Better would be if we could work in the following way:

    buffer.local_properties["dictionary_function"] = myfunction

...

    myfunction = buffer.local_properties["dictionary_function"]

with the guarantee that buffer.local_properties is not used for other
purposes.

R.

-- 
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 30 Jan 2014 - 06:36:02 EST

This archive was generated by hypermail 2.2.0 : Thu 30 Jan 2014 - 06:39:27 EST