Re: [code] [textadept] Textadept 11.0 alpha

From: Mitchell <>
Date: Thu, 2 Apr 2020 10:19:50 -0400 (EDT)

Hi Robert,

On Thu, 2 Apr 2020, Robert Gieseke wrote:

> Hi Mitchell,
> i've started getting Textredux ready for Textadept 11:
> Went quite painless, thanks a lot for your work on this update!
> One question, right now i have to load Textredux as
> events.connect(events.INITIALIZED, function()
> local textredux = require("textredux")
> textredux.hijack()
> = textredux.ctags.goto_symbol
> end)
> Previously it wasn't necessary to wrap this in an event, i found a
> section in the manual "Those types of function calls must occur within
> functions (e.g. in a key binding, menu item, or events.INITIALIZED event
> handler)." - but was just curious what has changed?

By waiting until `events.INITIALIZED` to work with menu and key binding values, you are guaranteed to be working with fully initialized menus and keys (as opposed to them being changed later by some modules loaded after textredux). I think technically things will still load if you were to call `hijack()` outside of `events.INITIALIZED`, but you might experience subtle bugs that would be hard to track down.

If you could be more specific as to why or how you've determined it's now necessary for you to wrap it in an `events.INITIALIZED` handler, I could probably give you a better explanation.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 02 Apr 2020 - 10:19:50 EDT

This archive was generated by hypermail 2.2.0 : Fri 03 Apr 2020 - 06:29:25 EDT