[code] Trouble setting buffer.edge_mode for a specific language without affecting other tabs

From: Kevin Thiart <kevinthiart.att.gmail.com>
Date: Wed, 11 Jun 2014 04:08:42 +0200


I'm trying to set buffer.edge_mode in TextAdept for Python files
only, without affecting any non-Python files.

Some info:
  - I'm running revision b44a9cbb568e of TextAdept on Ubuntu 14.04.
  - I also cloned and installed revision 8151bdcf7b66 of the
    official Python module.

Everything up to this point works 100% as expected.

Then I added a post_init.lua file to the ~/.textadept/modules/python
folder with the following contents:

    -- ~/.textadept/modules/python/post_init.lua
    events.connect(events.LEXER_LOADED, function(lang)
      if lang == 'python' then
        buffer.edge_column = 70
        buffer.edge_mode = buffer.EDGE_LINE

Now, after restarting TextAdept, whenever I open a Python file
the edge line shows up for all open tabs, Lua files included.

Is there some other event or check that I should be using?

Kind regards,

Kevin Thiart

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 10 Jun 2014 - 22:08:42 EDT

This archive was generated by hypermail 2.2.0 : Wed 11 Jun 2014 - 06:32:01 EDT